WienerWiener
  • Introduction
  • Comparison
  • Pricing
  • FAQ
  • Use Cases
  • License
  • Unity Asset vs Standalone
  • Obfuscation & Tamper Detection
  • Mismatch Detection & Debug
  • Localization
  • Versioning
  • Google Sheets Input
  • Excel
  • YAML
  • Settings
  • Data Format
  • Convert
  • ValueOnly Format
  • Startup
  • Samples
  • Converter
  • YAML Editor
  • Setting Editor
  • 日本語
  • English
  • Introduction
  • Comparison
  • Pricing
  • FAQ
  • Use Cases
  • License
  • Unity Asset vs Standalone
  • Obfuscation & Tamper Detection
  • Mismatch Detection & Debug
  • Localization
  • Versioning
  • Google Sheets Input
  • Excel
  • YAML
  • Settings
  • Data Format
  • Convert
  • ValueOnly Format
  • Startup
  • Samples
  • Converter
  • YAML Editor
  • Setting Editor
  • 日本語
  • English
  • Features

    • Obfuscation & Tamper Detection
    • Mismatch Detection & Debug
    • Localization
    • Versioning
    • Google Sheets Input

Mismatch Detection & Custom Handler

Wiener automatically detects inconsistencies between Static Game Data and source definitions, and lets you control the response with custom handlers.

When Detection Occurs

1. At Load Time (second argument of LoadBasicPackFromHash)

Pass an Action<string[]> delegate as the second argument to LoadBasicPackFromHash. When a mismatch is found during loading, the delegate receives an array of class names that had inconsistencies.

WienerManager.LoadBasicPackFromHash(path, (missingTargets) => {
    // missingTargets: array of class names with mismatches
    foreach (var target in missingTargets)
    {
        Debug.LogWarning($"Mismatch: {target}");
    }
});

Loading still succeeds even when mismatches are found. Fields that exist in source but not in the binary are filled with default values.

2. On Property Access (SetMissingDelegate)

Register a delegate with SetMissingDelegate to detect when a property of a class that failed to load is accessed at runtime.

Full Usage Example

var wm = new WienerManager();

wm.LoadBasicPackFromHash(path, (missingTargets) =>
{
    // At load time: receives an array of class names where mismatches were found
    foreach (var target in missingTargets)
    {
        Debug.LogWarning($"Mismatch: {target}");
    }
});

wm.SetMissingDelegate((className) =>
{
    // On property access: receives the class name of the master that was accessed but not properly loaded
    Debug.LogError($"Access to unloaded master: {className}");
});

// If Name could not be loaded due to a mismatch, the SetMissingDelegate callback fires here
var name = wm.Item[0].Name;

Production vs. Development Mode

Production (LoadBasicPack)Development (LoadBasicPackFromHash)
On mismatchImmediate error (safe stop)Notifies mismatch class list via 2nd argument delegate
Missing fieldsLoad failsFilled with default values; continues
Property access detection—Available via SetMissingDelegate
Use caseRelease buildsDevelopment, CI, debugging

Usage Scenarios

EnvironmentWhat to do
DevelopmentLog with onMissingTargets, show Editor dialog via SetMissingDelegate
CITreat as build error if onMissingTargets array is non-empty
Team notificationSend onMissingTargets contents to Slack / Discord webhook

CSV Export

WriteCSV retrieves the internally held data as header-included CSV strings.
The return value is Dictionary<string, string> (Key: file name, Value: CSV content).

var csvs = WienerManager.WriteCSV();
foreach (var csv in csvs)
{
    File.WriteAllText(csv.Key, csv.Value);
}

Use cases

  • Inspecting binary contents
  • Aggregating data with other tools or scripts
  • Taking diffs between data versions (e.g., git diff)
  • Sending Static Game Data contents to Slack from an in-app debug command during development

Related

  • Obfuscation — combining with tamper detection
  • Version Management — excluding dev data from production
  • C# API Reference
Last Updated:: 6/10/26, 10:12 PM
Contributors: artisan-sawasaka
Prev
Obfuscation & Tamper Detection
Next
Localization