public static void BackgroundWork() { var preloadedAssemblies = new List <Assembly>(); preloadedAssemblies.AddRange(Codebase.settingsAssemblies); preloadedAssemblies.AddRange(Codebase.ludiqEditorAssemblies); for (var i = 0; i < preloadedAssemblies.Count; i++) { var assembly = preloadedAssemblies[i]; ProgressUtility.DisplayProgressBar($"Documentation ({assembly.GetName().Name})...", null, (float)i / Codebase.settingsAssemblies.Count); var documentation = GetDocumentationUncached(assembly); lock (@lock) { if (!documentations.ContainsKey(assembly)) { documentations.Add(assembly, documentation); } } } UnityAPI.Async(() => { loaded = true; loadComplete?.Invoke(); }); }
public EnumOption(Enum @enum) { value = @enum; label = @enum.HumanName(); UnityAPI.Async(() => icon = @enum.Icon()); documentation = @enum.Documentation(); zoom = true; }
public TypeOption(Type type) { value = type; label = type.DisplayName(); UnityAPI.Async(() => icon = type.Icon()); documentation = type.Documentation(); zoom = true; }
public void Run(object assigner, object assignee) { if (requiresAPI) { UnityAPI.Async(() => _Run(assigner, assignee)); } else { _Run(assigner, assignee); } }