diff --git a/packages/common/src/constants/FeatureFlags.ts b/packages/common/src/constants/FeatureFlags.ts index 1236c42ef3..d73c341c46 100644 --- a/packages/common/src/constants/FeatureFlags.ts +++ b/packages/common/src/constants/FeatureFlags.ts @@ -42,6 +42,9 @@ export const FeatureFlags = { UI: { Hierarchy: { ShowModelChildren: 'ir.editor.ui.hierarchy.showModelChildren' + }, + TopBar: { + PointClickPlacement: 'ir.editor.ui.topBar.pointClickPlacement' } } } diff --git a/packages/editor/src/components/dialogs/CreatePrefabPanelDialog.tsx b/packages/editor/src/components/dialogs/CreatePrefabPanelDialog.tsx index 3c0917cd70..d327dff459 100644 --- a/packages/editor/src/components/dialogs/CreatePrefabPanelDialog.tsx +++ b/packages/editor/src/components/dialogs/CreatePrefabPanelDialog.tsx @@ -90,7 +90,7 @@ export default function CreatePrefabPanel({ entity }: { entity: Entity }) { scale: new Vector3(1, 1, 1) }) setComponent(entity, EntityTreeComponent, { parentEntity: prefabEntity }) - + getMutableState(SelectionState).selectedEntities.set([]) await exportRelativeGLTF(prefabEntity, srcProject, fileName) //await exportRelativeGLTF(entity, srcProject, fileName) //pass tags to static resource diff --git a/packages/editor/src/systems/EditorControlSystem.ts b/packages/editor/src/systems/EditorControlSystem.ts index e5a0967a50..c16f112c0e 100644 --- a/packages/editor/src/systems/EditorControlSystem.ts +++ b/packages/editor/src/systems/EditorControlSystem.ts @@ -132,6 +132,7 @@ const onKeyW = () => { } const onKeyP = () => { + if (!FeatureFlagsState.enabled(FeatureFlags.Studio.UI.TopBar.PointClickPlacement)) return const editorHelperState = getMutableState(EditorHelperState) if (editorHelperState.placementMode.value === PlacementMode.CLICK) { editorHelperState.placementMode.set(PlacementMode.DRAG) diff --git a/packages/ui/src/components/editor/panels/Viewport/tools/SceneHelpersTool.tsx b/packages/ui/src/components/editor/panels/Viewport/tools/SceneHelpersTool.tsx index fe166e51c3..33db7c281f 100644 --- a/packages/ui/src/components/editor/panels/Viewport/tools/SceneHelpersTool.tsx +++ b/packages/ui/src/components/editor/panels/Viewport/tools/SceneHelpersTool.tsx @@ -23,8 +23,10 @@ All portions of the code written by the Ethereal Engine team are Copyright © 20 Ethereal Engine. All Rights Reserved. */ +import { FeatureFlags } from '@etherealengine/common/src/constants/FeatureFlags' import { downloadScreenshot } from '@etherealengine/editor/src/functions/takeScreenshot' import { EditorHelperState, PlacementMode } from '@etherealengine/editor/src/services/EditorHelperState' +import { FeatureFlagsState } from '@etherealengine/engine' import { useMutableState } from '@etherealengine/hyperflux' import { RendererState } from '@etherealengine/spatial/src/renderer/RendererState' import React from 'react' @@ -45,22 +47,27 @@ export default function SceneHelpersTool() { return (