private static void WriteEditorData(UnityLinkerRunInformation runInformation) { var items = GetTypesInScenesInformation(runInformation.managedAssemblyFolderPath, runInformation.rcr); List <string> forceIncludeModules; List <string> forceExcludeModules; CollectIncludedAndExcludedModules(out forceIncludeModules, out forceExcludeModules); var editorToLinkerData = new EditorToLinkerData { typesInScenes = items.ToArray(), allNativeTypes = CollectNativeTypeData().ToArray(), forceIncludeModules = forceIncludeModules.ToArray(), forceExcludeModules = forceExcludeModules.ToArray() }; File.WriteAllText(runInformation.EditorToLinkerDataPath, JsonUtility.ToJson(editorToLinkerData, true)); }
private static string WriteEditorData(string managedAssemblyDirectory, RuntimeClassRegistry rcr) { var items = GetTypesInScenesInformation(managedAssemblyDirectory, rcr); List <string> forceIncludeModules; List <string> forceExcludeModules; CollectIncludedAndExcludedModules(out forceIncludeModules, out forceExcludeModules); var editorToLinkerData = new EditorToLinkerData { typesInScenes = items.ToArray(), allNativeTypes = CollectNativeTypeData().ToArray(), forceIncludeModules = forceIncludeModules.ToArray(), forceExcludeModules = forceExcludeModules.ToArray() }; var dataPath = Path.Combine(managedAssemblyDirectory, "EditorToUnityLinkerData.json"); File.WriteAllText(dataPath, JsonUtility.ToJson(editorToLinkerData, true)); return(dataPath); }