public void EnterEditMode() { BuilderInWorldNFTController.i.ClearNFTs(); ParcelSettings.VISUAL_LOADING_ENABLED = false; inputController.isBuildModeActivate = true; FindSceneToEdit(); sceneToEdit.SetEditMode(true); cursorGO.SetActive(false); parcelUnityMiddlePoint = BuilderInWorldUtils.CalculateUnityMiddlePoint(sceneToEdit); if (HUDController.i.builderInWorldMainHud != null) { HUDController.i.builderInWorldMainHud.SetVisibility(true); HUDController.i.builderInWorldMainHud.SetParcelScene(sceneToEdit); HUDController.i.builderInWorldMainHud.RefreshCatalogContent(); HUDController.i.builderInWorldMainHud.RefreshCatalogAssetPack(); } CommonScriptableObjects.builderInWorldNotNecessaryUIVisibilityStatus.Set(false); DCLCharacterController.OnPositionSet += ExitAfterCharacterTeleport; StartBiwControllers(); Environment.i.world.sceneController.ActivateBuilderInWorldEditScene(); if (IsNewScene()) { SetupNewScene(); biwFloorHandler.OnAllParcelsFloorLoaded -= OnAllParcelsFloorLoaded; biwFloorHandler.OnAllParcelsFloorLoaded += OnAllParcelsFloorLoaded; } else { initialLoadingController.Hide(); inputController.isInputActive = true; } isBuilderInWorldActivated = true; foreach (var groundVisual in groundVisualsGO) { groundVisual.SetActive(false); } previousSkyBoxMaterial = RenderSettings.skybox; RenderSettings.skybox = skyBoxMaterial; }
public void EnterEditMode() { BuilderInWorldNFTController.i.ClearNFTs(); ParcelSettings.VISUAL_LOADING_ENABLED = false; inputController.isInputActive = true; inputController.isBuildModeActivate = true; FindSceneToEdit(); sceneToEdit.SetEditMode(true); cursorGO.SetActive(false); if (HUDController.i.builderInWorldMainHud != null) { HUDController.i.builderInWorldMainHud.SetVisibility(true); HUDController.i.builderInWorldMainHud.SetParcelScene(sceneToEdit); HUDController.i.builderInWorldMainHud.RefreshCatalogContent(); HUDController.i.builderInWorldMainHud.RefreshCatalogAssetPack(); } if (currentActiveMode == null) { SetBuildMode(EditModeState.Editor); } CommonScriptableObjects.builderInWorldNotNecessaryUIVisibilityStatus.Set(false); DCLCharacterController.OnPositionSet += ExitAfterCharacterTeleport; builderInputWrapper.gameObject.SetActive(true); builderInWorldEntityHandler.EnterEditMode(sceneToEdit); Environment.i.world.sceneController.ActivateBuilderInWorldEditScene(); ActivateBuilderInWorldCamera(); if (IsNewScene()) { SetupNewScene(); } isEditModeActivated = true; }
public void EnterEditMode() { if (!initialLoadingController.isActive) { return; } BuilderInWorldNFTController.i.ClearNFTs(); ParcelSettings.VISUAL_LOADING_ENABLED = false; FindSceneToEdit(); sceneToEdit.SetEditMode(true); cursorGO.SetActive(false); parcelUnityMiddlePoint = BuilderInWorldUtils.CalculateUnityMiddlePoint(sceneToEdit); if (HUDController.i.builderInWorldMainHud != null) { HUDController.i.builderInWorldMainHud.SetParcelScene(sceneToEdit); HUDController.i.builderInWorldMainHud.RefreshCatalogContent(); HUDController.i.builderInWorldMainHud.RefreshCatalogAssetPack(); } if (HUDController.i.taskbarHud != null) { HUDController.i.taskbarHud.SetExploreInteractable(false); HUDController.i.taskbarHud.SetMoreTutorialInteractable(false); } CommonScriptableObjects.builderInWorldNotNecessaryUIVisibilityStatus.Set(false); DCLCharacterController.OnPositionSet += ExitAfterCharacterTeleport; StartBiwControllers(); Environment.i.world.sceneController.ActivateBuilderInWorldEditScene(); initialLoadingController.SetPercentage(100f); if (IsNewScene()) { SetupNewScene(); biwFloorHandler.OnAllParcelsFloorLoaded -= OnAllParcelsFloorLoaded; biwFloorHandler.OnAllParcelsFloorLoaded += OnAllParcelsFloorLoaded; } else { initialLoadingController.Hide(onHideAction: () => { inputController.inputTypeMode = InputTypeMode.BUILD_MODE; HUDController.i.builderInWorldMainHud?.SetVisibility(true); CommonScriptableObjects.allUIHidden.Set(previousAllUIHidden); }); } isBuilderInWorldActivated = true; foreach (var groundVisual in groundVisualsGO) { groundVisual.SetActive(false); } previousSkyBoxMaterial = RenderSettings.skybox; RenderSettings.skybox = skyBoxMaterial; OnEnterEditMode?.Invoke(); }
private void EnterEditMode() { if (!initialLoadingController.isActive) { return; } isEnteringEditMode = false; BIWNFTController.i.ClearNFTs(); ParcelSettings.VISUAL_LOADING_ENABLED = false; sceneToEdit.SetEditMode(true); cursorGO.SetActive(false); parcelUnityMiddlePoint = BIWUtils.CalculateUnityMiddlePoint(sceneToEdit); if (HUDController.i.builderInWorldMainHud != null) { HUDController.i.builderInWorldMainHud.SetParcelScene(sceneToEdit); HUDController.i.builderInWorldMainHud.RefreshCatalogContent(); HUDController.i.builderInWorldMainHud.RefreshCatalogAssetPack(); HUDController.i.builderInWorldMainHud.SetVisibilityOfCatalog(true); HUDController.i.builderInWorldMainHud.SetVisibilityOfInspector(true); } CommonScriptableObjects.builderInWorldNotNecessaryUIVisibilityStatus.Set(false); DataStore.i.dataStoreBuilderInWorld.showTaskBar.Set(true); DCLCharacterController.OnPositionSet += ExitAfterCharacterTeleport; EnterBiwControllers(); Environment.i.world.sceneController.ActivateBuilderInWorldEditScene(); initialLoadingController.SetPercentage(100f); if (IsNewScene()) { floorHandler.OnAllParcelsFloorLoaded -= OnAllParcelsFloorLoaded; floorHandler.OnAllParcelsFloorLoaded += OnAllParcelsFloorLoaded; SetupNewScene(); } else { initialLoadingController.Hide(onHideAction: () => { inputController.inputTypeMode = InputTypeMode.BUILD_MODE; HUDController.i.builderInWorldMainHud?.SetVisibility(true); CommonScriptableObjects.allUIHidden.Set(previousAllUIHidden); OpenNewProjectDetailsIfNeeded(); }); } isBuilderInWorldActivated = true; previousSkyBoxMaterial = RenderSettings.skybox; RenderSettings.skybox = skyBoxMaterial; foreach (var groundVisual in groundVisualsGO) { groundVisual.SetActive(false); } startEditorTimeStamp = Time.realtimeSinceStartup; BIWAnalytics.AddSceneInfo(sceneToEdit.sceneData.basePosition, BIWUtils.GetLandOwnershipType(landsWithAccess, sceneToEdit).ToString(), BIWUtils.GetSceneSize(sceneToEdit)); BIWAnalytics.EnterEditor(Time.realtimeSinceStartup - beginStartFlowTimeStamp); }