private void GameSettingsProviderServiceOnGameSettingsChanged(object sender, GameSettingsChangedEventArgs gameSettingsChangedEventArgs) { // Send game settings changes to dynamic navigation mesh system if (dynamicNavigationMeshSystem != null && gameSettingsChangedEventArgs.GameSettings != null) { var navigationSettings = gameSettingsChangedEventArgs.GameSettings.GetOrDefault <NavigationSettings>(); sceneEditorController.InvokeAsync(() => dynamicNavigationMeshSystem.InitializeSettingsFromNavigationSettings(navigationSettings)); } }
private async void GameSettingsChanged(object sender, GameSettingsChangedEventArgs e) { // Remark: we assume that GameStudioDatabase has already updated the compiler game settings, // which is the case because this service is registered before the creation of this EditorContentLoader if (e.GameSettings.GetOrCreate <RenderingSettings>().ColorSpace != currentColorSpace || e.GameSettings.GetOrCreate <EditorSettings>().RenderingMode != currentRenderingMode) { currentRenderingMode = e.GameSettings.GetOrCreate <EditorSettings>().RenderingMode; currentColorSpace = e.GameSettings.GetOrCreate <RenderingSettings>().ColorSpace; await BuildAndReloadAssets(Asset.Dependencies.ReferencedAssets.Select(x => x.AssetItem)); } // Update navigation meshes that are previewed inside the current scene when the game settings's group settings for navigation meshes change var navigationGroupsHash = e.GameSettings.GetOrCreate <NavigationSettings>().ComputeGroupsHash(); if (navigationGroupsHash != currentNavigationGroupsHash) { currentNavigationGroupsHash = navigationGroupsHash; await BuildAndReloadAssets(Session.AllAssets.Where(x => x.AssetType == typeof(NavigationMeshAsset)).Select(x => x.AssetItem)); } }
private void GameSettingsChanged(object sender, GameSettingsChangedEventArgs e) { UpdateGameSettings(e.GameSettings); }
private void GameSettingsChanged(object sender, GameSettingsChangedEventArgs e) { ReloadGraphicsCompositor(false).Forget(); }