コード例 #1
0
        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();
            });
        }
コード例 #2
0
 public EnumOption(Enum @enum)
 {
     value = @enum;
     label = @enum.HumanName();
     UnityAPI.Async(() => icon = @enum.Icon());
     documentation             = @enum.Documentation();
     zoom = true;
 }
コード例 #3
0
 public TypeOption(Type type)
 {
     value = type;
     label = type.DisplayName();
     UnityAPI.Async(() => icon = type.Icon());
     documentation             = type.Documentation();
     zoom = true;
 }
コード例 #4
0
 public void Run(object assigner, object assignee)
 {
     if (requiresAPI)
     {
         UnityAPI.Async(() => _Run(assigner, assignee));
     }
     else
     {
         _Run(assigner, assignee);
     }
 }