New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Prefab System #10047
base: dev
Are you sure you want to change the base?
Introduce Prefab System #10047
Conversation
…into 10034-introduce-prefab-system
…into 10034-introduce-prefab-system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good first step, but it is not functional as a prefab abstraction over our components. We need to remove the Add Component & remove component functionality while in simple mode, as well as new properties editors for the prefabs that are abstractions on top of components. We also need to populate the prefab list with all the other prefabs we want (video, volumetric, geometry, ground plane etc)
packages/editor/src/components/hierarchy/HierarchyPanelContainer.tsx
Outdated
Show resolved
Hide resolved
name: 'ee.editor.PrefabShelfCategories', | ||
initial: () => { | ||
return { | ||
'Light Prefab': [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beyond this state, we need to also have the infrastructure to swap the component used inside the light editor, this alone doesn't make sense. We only want one of these components on an entity, and we want to have a dropdown in the properties editor for this. Same goes for the others.
if (getMutableState(EditorHelperState).studioMode.value == 'Advanced') { | ||
EditorControlFunctions.createObjectFromSceneElement() | ||
} | ||
}} | ||
> | ||
{t('editor:hierarchy.lbl-addEntity')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should change the language here for Add Entity in simple mode to Add Object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lines mean if user select Advanced mode the studio will be same.
When select simple mode the fuctions of add object are in PrefabList.tsx which was called in HierarchyPanelContainer.tsx line 523.
…into 10034-introduce-prefab-system
…herealEngine/etherealengine into 10034-introduce-prefab-system
…into 10034-introduce-prefab-system
{t('editor:properties.lbl-addComponent')} | ||
</PropertiesPanelButton> | ||
</div> | ||
<Popover | ||
id={open ? 'add-component-popover' : undefined} | ||
open={open} | ||
open={open && studioMode.value == 'Advanced'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use ===
instead of ==
@@ -490,7 +491,7 @@ function HierarchyPanelContents({ rootEntityUUID }: { rootEntityUUID: EntityUUID | |||
}} | |||
onClick={(event) => { | |||
anchorElement.set(event.currentTarget) | |||
if (getMutableState(EditorHelperState).studioMode.value == 'Advanced') { | |||
if (studioMode.value == 'Advanced') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use ===
instead of ==
@@ -507,7 +508,7 @@ function HierarchyPanelContents({ rootEntityUUID }: { rootEntityUUID: EntityUUID | |||
> | |||
<Popover | |||
id={open ? 'add-component-popover' : undefined} | |||
open={open && getMutableState(EditorHelperState).studioMode.value == 'Simple'} | |||
open={open && studioMode.value == 'Simple'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use ===
instead of ==
Summary
issue 10034, make the Add Entity button show a popup modal list prefabs
Subtasks Checklist
Breaking Changes
References
closes #10033
closes #10034
QA Steps