// See: IL2CPP/Metadata.cs public void GetStringLiterals(Metadata metadata, PluginGetStringLiteralsEventInfo data) { // NOTE: Metadata derives from BinaryObjectStream // Everything is available in Metadata except StringLiterals // See PostProcessMetadata below // Set data.Strings to a complete list of indexes and strings // and set data.IsDataModified }
// This executes just as Il2CppInspector is about to read all of the constant literal strings used in the application // We can use this to acquire the string literals ourselves instead // String literals are indexed from 0-n, however we don't currently know the value of n, // and we won't be able to calculate it until the application binary has also been processed. // Instead, we simply tell Il2CppInspector we have handled the string literals but actually do nothing, // and defer this task until later public void GetStringLiterals(Metadata metadata, PluginGetStringLiteralsEventInfo data) { // Don't do anything if this isn't for us if (!IsOurs) { return; } // We need to prevent Il2CppInspector from attempting to read string literals from the metadata file // until we can calculate how many there are data.FullyProcessed = true; }