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

Commit

Permalink
fix path for folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JT00y committed Jun 17, 2024
1 parent 059023b commit 7322748
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { HeirarchyTreeNodeType } from '../hierarchy/HeirarchyTreeWalker'

export default function CreatePrefabPanel({ node }: { node?: HeirarchyTreeNodeType }) {
const entity = node?.entity as Entity
const defaultPrefabFolder = useHookstate<string>('/assets/custom-prefabs')
const defaultPrefabFolder = useHookstate<string>('assets/custom-prefabs')
const prefabName = useHookstate<string>('prefab')
const prefabTag = useHookstate<string[]>([])
const { t } = useTranslation()
Expand All @@ -57,7 +57,7 @@ export default function CreatePrefabPanel({ node }: { node?: HeirarchyTreeNodeTy
await exportRelativeGLTF(entity, srcProject, fileName)
//pass tags to static resource
const resources = await Engine.instance.api.service(staticResourcePath).find({
query: { key: 'projects/' + srcProject + fileName }
query: { key: 'projects/' + srcProject + '/' + fileName }
})
if (resources.data.length === 0) {
throw new Error('User not found')
Expand All @@ -66,7 +66,7 @@ export default function CreatePrefabPanel({ node }: { node?: HeirarchyTreeNodeTy
const tags = [...prefabTag.value]
await Engine.instance.api.service(staticResourcePath).patch(resource.id, { tags: tags })
PopoverState.hidePopupover()
defaultPrefabFolder.set('/assets/custom-prefabs')
defaultPrefabFolder.set('assets/custom-prefabs')
prefabName.set('prefab')
prefabTag.set([])
} catch (e) {
Expand Down

0 comments on commit 7322748

Please sign in to comment.