Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
update visibility to authoring layer (#10428)
Browse files Browse the repository at this point in the history
  • Loading branch information
JT00y authored Jun 21, 2024
1 parent cee23cb commit 1cb2168
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ export const HierarchyTreeNode = (props: HierarchyTreeNodeProps) => {
const sceneAssetLoading = useOptionalComponent(node.entity, ResourcePendingComponent)

const toggleVisible = () => {
if (visible) {
EditorControlFunctions.addOrRemoveComponent([node.entity], VisibleComponent, false)
} else {
EditorControlFunctions.addOrRemoveComponent([node.entity], VisibleComponent, true)
}
setVisibleComponent(node.entity, !hasComponent(node.entity, VisibleComponent))
}

Expand Down

0 comments on commit 1cb2168

Please sign in to comment.