Forum Discussion

ironmanromeo's avatar
ironmanromeo
Honored Guest
19 days ago

Component disappear in Editor

I've been learning ISWDK for a couple of weeks. I like it: it's really cool. I finished the tutorial and almost everything works, but there's one thing I'm not clear on: when I try to create a "prop" on an Entity or Enum component, Meta Spatial Editor doesn't compile (or at least the component disappears) after pressing the Refresh button. It definitely looks like a bug because the documentation cites examples with Entities and Enums. I copied and ran it, but while it doesn't give any errors on the code side, the component on the editor side disappears. All other types are visible and their parameters are accessible from the UI. I'd like to make a tutorial explaining how to migrate from Unity to IWSDK, but I'm missing this step.

Here Locomotion is available in Meta Spatial Editor:

export const Locomotion = createComponent('Locomotion', {
      test: { type: Types.Int8,  default: 1 }, 
});

Here Locomotion is NOT available anymore in Meta Spatial Editor:

export const MovementMode = { Walk: 'walk', Fly: 'fly' } as const
export const Locomotion = createComponent('Locomotion', {
      test: { type: Types.Int8,  default: 1 }, 

      mode: { type: Types.Enum, enum: MovementMode, default: MovementMode.Walk },  // <--
});

Where I wrong?

Sdk: 0.2.2
Meta Spatial Editor: v11.0.0.10

Many thanks in advance 

#IWSDK, #Types.Entity, #Types.Enum #metaspatialeditor

 
No RepliesBe the first to reply

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions