public static void BuildEverything() { var count = 0; foreach (var asm in System.AppDomain.CurrentDomain.GetAssemblies()) { if (blackListesAssemblies.Contains(asm.FullName)) { continue; } foreach (var type in asm.GetTypes()) { if (type.IsSubclassOf(typeof(Component))) { count += AddClassToRegister(type); } } } Debug.Log($"{count} classed generated."); SurrogateCompiler.Save(); AssetDatabase.Refresh(); }
void Build() { var sr = target as SurrogateRegister; foreach (var mi in sr.methodIndex.Keys.ToArray()) { sr.methodIndex[mi] = SurrogateCompiler.CreateAction(mi).AssemblyQualifiedName; } foreach (var fi in sr.fieldIndex.Keys.ToArray()) { sr.fieldIndex[fi] = SurrogateCompiler.CreateField(fi).AssemblyQualifiedName; } foreach (var pi in sr.propertyIndex.Keys.ToArray()) { sr.propertyIndex[pi] = SurrogateCompiler.CreateProperty(pi).AssemblyQualifiedName; } sr.missingFields.Clear(); sr.missingMethods.Clear(); sr.missingProperties.Clear(); EditorUtility.SetDirty(sr); SurrogateCompiler.Save(); AssetDatabase.Refresh(); }