public static async UniTask InitializeAsync()
        {
            if (Engine.Initialized)
            {
                return;
            }

            var configProvider = new ProjectConfigurationProvider();
            var behaviour      = new EditorBehaviour();
            var services       = new List <IEngineService>();

            var providersManager = new ResourceProviderManager(configProvider.GetConfiguration <ResourceProviderConfiguration>());

            services.Add(providersManager);

            var localizationManager = new LocalizationManager(configProvider.GetConfiguration <LocalizationConfiguration>(), providersManager);

            services.Add(localizationManager);

            var scriptsManager = new ScriptManager(configProvider.GetConfiguration <ScriptsConfiguration>(), providersManager, localizationManager);

            services.Add(scriptsManager);

            var varsManager = new CustomVariableManager(configProvider.GetConfiguration <CustomVariablesConfiguration>());

            services.Add(varsManager);

            await Engine.InitializeAsync(configProvider, behaviour, services);
        }
Esempio n. 2
0
        private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
        {
            if (BuildProcessor.Building)
            {
                return;
            }

            var modifiedResources = false;

            foreach (string assetPath in importedAssets)
            {
                if (AssetDatabase.GetMainAssetTypeAtPath(assetPath) != typeof(Script))
                {
                    continue;
                }

                if (configuration is null)
                {
                    configuration = ProjectConfigurationProvider.LoadOrDefault <ScriptsConfiguration>();
                }
                if (editorResources is null)
                {
                    editorResources = EditorResources.LoadOrDefault();
                }

                HandleAutoAdd(assetPath, ref modifiedResources);
            }

            if (modifiedResources)
            {
                EditorUtility.SetDirty(editorResources);
                AssetDatabase.SaveAssets();
            }
        }
Esempio n. 3
0
        private void OnEnable()
        {
            var config    = ProjectConfigurationProvider.LoadOrDefault <ScriptsConfiguration>();
            var state     = ScriptGraphState.LoadOrDefault();
            var resources = EditorResources.LoadOrDefault();
            var records   = resources.GetAllRecords(config.Loader.PathPrefix).ToArray();
            var scripts   = new List <Script>();

            for (int i = 0; i < records.Length; i++)
            {
                var record   = records[i];
                var progress = i / (float)records.Length;
                EditorUtility.DisplayProgressBar(ScriptGraphView.ProgressBarTitle, $"Loading `{record.Key}` script...", progress);

                var guid = record.Value;
                var path = AssetDatabase.GUIDToAssetPath(guid);
                if (string.IsNullOrEmpty(path))
                {
                    continue;
                }

                var script = AssetDatabase.LoadAssetAtPath <Script>(path);
                if (!ObjectUtils.IsValid(script))
                {
                    continue;
                }
                scripts.Add(script);
            }

            graphView      = new ScriptGraphView(config, state, scripts);
            graphView.name = "Script Graph";
            rootVisualElement.Add(graphView);
            graphView.StretchToParentSize();
        }
Esempio n. 4
0
        private static void HandleEngineInitialized()
        {
            if (!(Engine.Behaviour is RuntimeBehaviour))
            {
                return;
            }

            if (configuration is null)
            {
                configuration = ProjectConfigurationProvider.LoadOrDefault <ScriptsConfiguration>();
            }
            if (editorResources is null)
            {
                editorResources = EditorResources.LoadOrDefault();
            }

            if (!configuration.HotReloadScripts)
            {
                return;
            }

            scriptManager  = Engine.GetService <IScriptManager>();
            player         = Engine.GetService <IScriptPlayer>();
            stateManager   = Engine.GetService <IStateManager>();
            player.OnPlay += HandleStartPlaying;
        }
Esempio n. 5
0
        public override void OnEnable()
        {
            base.OnEnable();

            if (config is null)
            {
                config = ProjectConfigurationProvider.LoadOrDefault <ScriptsConfiguration>();
            }
            ScriptAsset = assetTarget as Script;
            scriptText  = File.ReadAllText(AssetDatabase.GetAssetPath(ScriptAsset));

            if (config.EnableVisualEditor)
            {
                VisualEditor = new ScriptView(config, ApplyRevertHackGUI, ApplyAndImportChecked);
                VisualEditor.GenerateForScript(scriptText, ScriptAsset);

                ScriptAssetPostprocessor.OnModified += HandleScriptModified;
                return;
            }

            previewContent = scriptText;
            if (previewContent.Length > previewLengthLimit)
            {
                previewContent  = previewContent.Substring(0, previewLengthLimit);
                previewContent += $"{System.Environment.NewLine}<...>";
            }

            labelTags = ScriptAsset.Lines.OfType <LabelScriptLine>().Select(l => new GUIContent($"# {l.LabelText}")).ToArray();
            gotoTags  = ScriptAsset.ExtractCommands().OfType <Commands.Goto>()
                        .Where(c => !string.IsNullOrEmpty(c.Path.Name))
                        .Select(c => new GUIContent($"@goto {c.Path.ToString().Replace(".null", "")}")).ToArray();
        }
Esempio n. 6
0
        private static void Initialize()
        {
            if (ProjectConfigurationProvider.LoadOrDefault <ResourceProviderConfiguration>().EnableBuildProcessing)
            {
                BuildPlayerWindow.RegisterBuildPlayerHandler(BuildHandler);
            }

            ProjectResourcesBuildProcessor.TempFolderPath = TempResourcesPath;
        }
Esempio n. 7
0
        private static void OnApplicationLoaded()
        {
            var engineConfig = ProjectConfigurationProvider.LoadOrDefault <EngineConfiguration>();

            if (engineConfig.InitializeOnApplicationLoad)
            {
                InitializeAsync().Forget();
            }
        }
Esempio n. 8
0
        private static void OnApplicationLoaded()
        {
            var configProvider = new ProjectConfigurationProvider();
            var engineConfig   = configProvider.GetConfiguration <EngineConfiguration>();

            if (engineConfig.InitializeOnApplicationLoad)
            {
                InitializeAsync(configProvider).Forget();
            }
        }
Esempio n. 9
0
        private void Awake()
        {
            if (!initializeOnAwake)
            {
                return;
            }

            var configProvider = new ProjectConfigurationProvider();

            InitializeAsync(configProvider).Forget();
        }
        private static void SaveConfigurationObject(Configuration configuration)
        {
            var generatedDataPath = ProjectConfigurationProvider.LoadOrDefault <EngineConfiguration>().GeneratedDataPath;
            var dirPath           = PathUtils.Combine(Application.dataPath, $"{generatedDataPath}/Resources/{ProjectConfigurationProvider.DefaultResourcesPath}");
            var assetPath         = PathUtils.AbsoluteToAssetPath(PathUtils.Combine(dirPath, $"{configuration.GetType().Name}.asset"));

            System.IO.Directory.CreateDirectory(dirPath);
            AssetDatabase.CreateAsset(configuration, assetPath);
            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();
        }
Esempio n. 11
0
 /// <summary>
 /// Providers configuration of the requested type either via configuration provider
 /// (when engine is initialized) or by loading the asset from default resources folder.
 /// </summary>
 public static T GetOrDefault <T> () where T : Configuration
 {
     if (Engine.Initialized)
     {
         return(Engine.GetConfiguration <T>());
     }
     else
     {
         return(ProjectConfigurationProvider.LoadOrDefault <T>());
     }
 }
        public static TConfig LoadOrDefaultAndSave <TConfig> ()
            where TConfig : Configuration, new()
        {
            var configuration = ProjectConfigurationProvider.LoadOrDefault <TConfig>();

            if (!AssetDatabase.Contains(configuration))
            {
                SaveConfigurationObject(configuration);
            }

            return(configuration);
        }
Esempio n. 13
0
        private static void Initialize()
        {
            var config = ProjectConfigurationProvider.LoadOrDefault <ScriptsConfiguration>();

            if (!config.WatchScripts)
            {
                return;
            }
            EditorApplication.update += Update;
            var dataPath = string.IsNullOrEmpty(config.WatchedDirectory) || !Directory.Exists(config.WatchedDirectory) ? Application.dataPath : config.WatchedDirectory;

            Task.Run(() => StartWatcher(dataPath))
            .ContinueWith(StopWatcher, TaskScheduler.FromCurrentSynchronizationContext());
        }
        public override void OnActivate(string searchContext, VisualElement rootElement)
        {
            Configuration    = ProjectConfigurationProvider.LoadOrDefault(ConfigurationType);
            SerializedObject = new SerializedObject(Configuration);
            keywords         = GetSearchKeywordsFromSerializedObject(SerializedObject);

            // Save the asset in case it was just generated.
            if (!AssetDatabase.Contains(Configuration))
            {
                SaveConfigurationObject(Configuration);
            }

            assetTargets = new[] { Configuration };
        }
Esempio n. 15
0
        private static IReadOnlyCollection <Type> GetEngineTypes()
        {
            var engineTypes      = new List <Type>(1000);
            var engineConfig     = ProjectConfigurationProvider.LoadOrDefault <EngineConfiguration>();
            var domainAssemblies = ReflectionUtils.GetDomainAssemblies(true, true, true);

            foreach (var assemblyName in engineConfig.TypeAssemblies)
            {
                var assembly = domainAssemblies.FirstOrDefault(a => a.FullName.StartsWithFast($"{assemblyName},"));
                if (assembly is null)
                {
                    continue;
                }
                engineTypes.AddRange(assembly.GetExportedTypes());
            }
            return(engineTypes);
        }
Esempio n. 16
0
        private static void Upgrade198To110()
        {
            if (!EditorUtility.DisplayDialog("Perform upgrade?",
                                             "Are you sure you want to perform v1.9.8-v1.10 upgrade? Configuration assets will be modified. Make sure to perform a backup before confirming.",
                                             "Upgrade", "Cancel"))
            {
                return;
            }

            var stateConfig = ProjectConfigurationProvider.LoadOrDefault <StateConfiguration>();

            stateConfig.GameStateHandler     = typeof(IOGameStateSlotManager).AssemblyQualifiedName;
            stateConfig.GlobalStateHandler   = typeof(IOGlobalStateSlotManager).AssemblyQualifiedName;
            stateConfig.SettingsStateHandler = typeof(IOSettingsSlotManager).AssemblyQualifiedName;

            EditorUtility.SetDirty(stateConfig);
            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();
        }
Esempio n. 17
0
        /// <summary>
        /// Loads an existing asset from package data folder or creates a new default instance.
        /// </summary>
        public static ScriptGraphState LoadOrDefault()
        {
            var generatedDataPath = ProjectConfigurationProvider.LoadOrDefault <EngineConfiguration>().GeneratedDataPath;
            var directoryPath     = PathUtils.Combine(Application.dataPath, generatedDataPath);
            var assetPath         = PathUtils.AbsoluteToAssetPath(PathUtils.Combine(directoryPath, $"{nameof(ScriptGraphState)}.asset"));

            var obj = AssetDatabase.LoadAssetAtPath <ScriptGraphState>(assetPath);

            if (!ObjectUtils.IsValid(obj))
            {
                obj = CreateInstance <ScriptGraphState>();
                System.IO.Directory.CreateDirectory(directoryPath);
                AssetDatabase.CreateAsset(obj, assetPath);
                AssetDatabase.Refresh();
                AssetDatabase.SaveAssets();
            }

            return(obj);
        }
Esempio n. 18
0
        /// <summary>
        /// Loads an existing asset from package data folder or creates a new default instance.
        /// </summary>
        public static EditorResources LoadOrDefault()
        {
            var generatedDataPath = ProjectConfigurationProvider.LoadOrDefault <EngineConfiguration>().GeneratedDataPath;
            var directoryPath     = PathUtils.Combine(Application.dataPath, generatedDataPath);
            var assetPath         = PathUtils.AbsoluteToAssetPath(PathUtils.Combine(directoryPath, $"{nameof(EditorResources)}.asset"));

            var obj = AssetDatabase.LoadAssetAtPath <EditorResources>(assetPath);

            if (!ObjectUtils.IsValid(obj))
            {
                obj = CreateInstance <EditorResources>();
                obj.AddBuiltinAssets();
                Directory.CreateDirectory(directoryPath);
                AssetDatabase.CreateAsset(obj, assetPath);
                AssetDatabase.Refresh();
                AssetDatabase.SaveAssets();
            }

            return(obj);
        }
Esempio n. 19
0
        private static void Initialize()
        {
            ScriptAssetPostprocessor.OnModified += HandleScriptModifiedAsync;
            Engine.OnInitializationFinished     += HandleEngineInitialized;

            void HandleEngineInitialized()
            {
                if (!(Engine.Behaviour is RuntimeBehaviour))
                {
                    return;
                }

                if (configuration is null)
                {
                    configuration = ProjectConfigurationProvider.LoadOrDefault <ScriptsConfiguration>();
                }

                scriptManager  = Engine.GetService <IScriptManager>();
                player         = Engine.GetService <IScriptPlayer>();
                stateManager   = Engine.GetService <IStateManager>();
                player.OnPlay += HandleStartPlaying;
            }
        }
Esempio n. 20
0
        private static void Upgrade195To196()
        {
            if (!EditorUtility.DisplayDialog("Perform upgrade?",
                                             "Are you sure you want to perform v1.9.5-v1.9.6 upgrade? Configuration assets will be modified. Make sure to perform a backup before confirming.",
                                             "Upgrade", "Cancel"))
            {
                return;
            }

            // Remove `Naninovel/` path prefixes from config and metadata.
            var configTypes = ReflectionUtils.ExportedDomainTypes
                              .Where(type => typeof(Configuration).IsAssignableFrom(type) && type.IsClass && !type.IsAbstract);

            foreach (var configType in configTypes)
            {
                var configAsset = ProjectConfigurationProvider.LoadOrDefault(configType);

                // Root loaders.
                var rootLoadersInfo = configAsset.GetType().GetFields()
                                      .Where(f => f.FieldType == typeof(ResourceLoaderConfiguration)).ToList();
                foreach (var rootLoaderInfo in rootLoadersInfo)
                {
                    ProcessLoader(rootLoaderInfo, rootLoaderInfo.GetValue(configAsset));
                }

                // Default metadata.
                var defaultMatadataPropertyInfo = configAsset.GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Instance)
                                                  .Where(p => p.Name == "DefaultActorMetadata").FirstOrDefault();
                if (defaultMatadataPropertyInfo != null)
                {
                    var meta            = defaultMatadataPropertyInfo.GetValue(configAsset) as ActorMetadata;
                    var loaderFieldInfo = meta.GetType().GetField(nameof(ActorMetadata.Loader));
                    ProcessLoader(loaderFieldInfo, meta.Loader);
                }

                // Actor metadata.
                var actorMatadataMapPropertyInfo = configAsset.GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Instance)
                                                   .Where(p => p.Name == "ActorMetadataMap").FirstOrDefault();
                if (actorMatadataMapPropertyInfo != null)
                {
                    var actorMatadataMap = actorMatadataMapPropertyInfo.GetValue(configAsset);
                    var metasFieldInfo   = actorMatadataMap.GetType().GetFieldWithInheritence("metas", BindingFlags.NonPublic | BindingFlags.Instance);
                    var metas            = metasFieldInfo.GetValue(actorMatadataMap) as Array;
                    for (int i = 0; i < metas.Length; i++)
                    {
                        var meta            = metas.GetValue(i) as ActorMetadata;
                        var loaderFieldInfo = meta.GetType().GetField(nameof(ActorMetadata.Loader));
                        ProcessLoader(loaderFieldInfo, meta.Loader);
                    }
                }

                void ProcessLoader(FieldInfo loaderFieldInfo, object loaderObject)
                {
                    var prefixFieldInfo = loaderFieldInfo.FieldType.GetField(nameof(ResourceLoaderConfiguration.PathPrefix));
                    var currentValue    = prefixFieldInfo.GetValue(loaderObject) as string;

                    if (!currentValue.Contains("Naninovel/"))
                    {
                        return;
                    }
                    var newValue = currentValue.GetAfter("Naninovel/");

                    prefixFieldInfo.SetValue(loaderObject, newValue);
                }

                EditorUtility.SetDirty(configAsset);
            }

            // Remove `Naninovel/` path prefixes from editor resources.
            var editorResources     = EditorResources.LoadOrDefault();
            var editorResourcesPath = AssetDatabase.GetAssetPath(editorResources);
            var editorResourcesText = File.ReadAllText(editorResourcesPath, Encoding.UTF8);

            editorResourcesText = editorResourcesText.Replace("Naninovel/", string.Empty);
            File.WriteAllText(editorResourcesPath, editorResourcesText, Encoding.UTF8);
            AssetDatabase.ImportAsset(editorResourcesPath, ImportAssetOptions.ForceUpdate);

            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();
        }
Esempio n. 21
0
        public static void PreprocessBuild(BuildPlayerOptions options)
        {
            config = ProjectConfigurationProvider.LoadOrDefault <ResourceProviderConfiguration>();

            useAddressables = AddressableHelper.Available && config.UseAddressables;
            if (!useAddressables)
            {
                Debug.Log("Consider installing the Addressable Asset System (via Unity's package manager) and enabling `Use Addressables` in the Naninovel's `Resource Provider` configuration menu. When the system is not available, all the assets assigned as Naninovel resources and not stored in `Resources` folders will be copied and re-imported when building the player, which could significantly increase the build time.");
            }

            if (useAddressables)
            {
                AddressableHelper.RemovePreviousEntries();
            }

            EditorUtils.CreateFolderAsset(TempResourcesPath);

            var records          = EditorResources.LoadOrDefault().GetAllRecords();
            var projectResources = ProjectResources.Get();
            var progress         = 0;

            foreach (var record in records)
            {
                progress++;

                var resourcePath      = record.Key;
                var assetGuid         = record.Value;
                var resourceAssetPath = AssetDatabase.GUIDToAssetPath(assetGuid);
                if (string.IsNullOrEmpty(resourceAssetPath) || !EditorUtils.AssetExistsByPath(resourceAssetPath))
                {
                    Debug.LogWarning($"Failed to resolve `{resourcePath}` asset path from GUID stored in `EditorResources` asset. The resource won't be included to the build.");
                    continue;
                }

                var resourceAsset = AssetDatabase.LoadAssetAtPath <Object>(resourceAssetPath);
                if (string.IsNullOrEmpty(resourceAssetPath))
                {
                    Debug.LogWarning($"Failed to load `{resourcePath}` asset. The resource won't be included to the build.");
                    continue;
                }

                if (EditorUtility.DisplayCancelableProgressBar("Processing Naninovel Resources", $"Processing '{resourceAssetPath}' asset...", progress / (float)records.Count))
                {
                    PostprocessBuild(); // Remove temporary assets.
                    throw new System.OperationCanceledException("Build was cancelled by the user.");
                }

                if (resourceAsset is SceneAsset)
                {
                    ProcessSceneResource(resourcePath, resourceAsset as SceneAsset);
                }
                else if (resourceAsset is UnityEngine.Video.VideoClip && options.target == BuildTarget.WebGL)
                {
                    ProcessVideoResourceForWebGL(resourcePath, resourceAsset);
                }
                else
                {
                    ProcessResourceAsset(assetGuid, resourcePath, resourceAsset, projectResources);
                }
            }

            AssetDatabase.SaveAssets();

            if (useAddressables && config.AutoBuildBundles)
            {
                EditorUtility.DisplayProgressBar("Processing Naninovel Resources", "Building asset bundles...", 1f);
                AddressableHelper.RebuildPlayerContent();
            }

            EditorUtility.ClearProgressBar();
        }
Esempio n. 22
0
        /// <summary>
        /// Invokes default engine initialization routine.
        /// </summary>
        /// <param name="configurationProvider">Configuration provider to use for engine initialization.</param>
        public static async UniTask InitializeAsync(IConfigurationProvider configurationProvider = null)
        {
            if (Engine.Initialized)
            {
                return;
            }
            if (initializeTCS != null)
            {
                await initializeTCS.Task; return;
            }

            initializeTCS = new UniTaskCompletionSource();

            if (configurationProvider is null)
            {
                configurationProvider = new ProjectConfigurationProvider();
            }
            var engineConfig = configurationProvider.GetConfiguration <EngineConfiguration>();

            UniTaskScheduler.UnobservedExceptionWriteLogType = engineConfig.AsyncExceptionLogType;

            var initializationUI = default(ScriptableUIBehaviour);

            if (engineConfig.ShowInitializationUI)
            {
                var initUIPrefab = ObjectUtils.IsValid(engineConfig.CustomInitializationUI) ? engineConfig.CustomInitializationUI : Resources.Load <ScriptableUIBehaviour>(defaultInitUIResourcesPath);
                initializationUI = Instantiate(initUIPrefab);
                initializationUI.Show();
            }

            var initData       = new List <ServiceInitData>();
            var overridenTypes = new List <Type>();

            foreach (var type in Engine.Types)
            {
                var initAttribute = Attribute.GetCustomAttribute(type, typeof(InitializeAtRuntimeAttribute), false) as InitializeAtRuntimeAttribute;
                if (initAttribute is null)
                {
                    continue;
                }
                initData.Add(new ServiceInitData(type, initAttribute));
                if (initAttribute.Override != null)
                {
                    overridenTypes.Add(initAttribute.Override);
                }
            }
            initData = initData.Where(d => !overridenTypes.Contains(d.Type)).ToList(); // Exclude services overriden by user.

            bool IsService(Type t) => typeof(IEngineService).IsAssignableFrom(t);
            bool IsBehaviour(Type t) => typeof(IEngineBehaviour).IsAssignableFrom(t);
            bool IsConfig(Type t) => typeof(Configuration).IsAssignableFrom(t);

            // Order by initialization priority and then perform topological order to make sure ctor references initialized before they're used.
            // ReSharper disable once AccessToModifiedClosure (false positive: we're assigning result of the closure to the variable in question)
            IEnumerable <ServiceInitData> GetDependencies(ServiceInitData d) => d.CtorArgs.Where(IsService).SelectMany(argType => initData.Where(dd => d != dd && argType.IsAssignableFrom(dd.Type)));

            initData = initData.OrderBy(d => d.Priority).TopologicalOrder(GetDependencies).ToList();

            var behaviour  = RuntimeBehaviour.Create(engineConfig.SceneIndependent);
            var services   = new List <IEngineService>();
            var ctorParams = new List <object>();

            foreach (var data in initData)
            {
                foreach (var argType in data.CtorArgs)
                {
                    if (IsService(argType))
                    {
                        ctorParams.Add(services.First(s => argType.IsInstanceOfType(s)));
                    }
                    else if (IsBehaviour(argType))
                    {
                        ctorParams.Add(behaviour);
                    }
                    else if (IsConfig(argType))
                    {
                        ctorParams.Add(configurationProvider.GetConfiguration(argType));
                    }
                    else
                    {
                        throw new Exception($"Only `{nameof(Configuration)}`, `{nameof(IEngineBehaviour)}` and `{nameof(IEngineService)}` with an `{nameof(InitializeAtRuntimeAttribute)}` can be requested in an engine service constructor.");
                    }
                }
                var service = Activator.CreateInstance(data.Type, ctorParams.ToArray()) as IEngineService;
                services.Add(service);
                ctorParams.Clear();
            }

            await Engine.InitializeAsync(configurationProvider, behaviour, services);

            if (!Engine.Initialized) // In case terminated in the midst of initialization.
            {
                if (initializationUI != null)
                {
                    ObjectUtils.DestroyOrImmediate(initializationUI.gameObject);
                }
                DisposeTCS();
                return;
            }

            ExpressionEvaluator.Initialize();

            if (initializationUI != null)
            {
                await initializationUI.ChangeVisibilityAsync(false);

                ObjectUtils.DestroyOrImmediate(initializationUI.gameObject);
            }

            var moviePlayer = Engine.GetService <IMoviePlayer>();

            if (moviePlayer.Configuration.PlayIntroMovie)
            {
                await moviePlayer.PlayAsync(moviePlayer.Configuration.IntroMovieName);
            }

            var scriptPlayer  = Engine.GetService <IScriptPlayer>();
            var scriptManager = Engine.GetService <IScriptManager>();

            if (!string.IsNullOrEmpty(scriptManager.Configuration.InitializationScript))
            {
                await scriptPlayer.PreloadAndPlayAsync(scriptManager.Configuration.InitializationScript);

                while (scriptPlayer.Playing)
                {
                    await AsyncUtils.WaitEndOfFrame;
                }
            }

            if (engineConfig.ShowTitleUI)
            {
                Engine.GetService <IUIManager>().GetUI <UI.ITitleUI>()?.Show();
            }

            if (scriptManager.Configuration.ShowNavigatorOnInit && scriptManager.ScriptNavigator)
            {
                scriptManager.ScriptNavigator.Show();
            }

            DisposeTCS();
        }
 public ScenePositionPropertyDrawer()
 {
     cameraConfiguration = ProjectConfigurationProvider.LoadOrDefault <CameraConfiguration>();
 }
Esempio n. 24
0
 private void OnEnable()
 {
     editorResources = EditorResources.LoadOrDefault();
     audioConfig     = ProjectConfigurationProvider.LoadOrDefault <AudioConfiguration>();
     UpdateSelectedScript();
 }