cancel
Showing results for 
Search instead for 
Did you mean: 

Script error

LitlMan69
Member

IMG_3688.jpeg

 hello everyone I have this error that I can’t seem to find on how to fix it, any help will be much appreciated. Thanks

3 REPLIES 3

PigeonNo12
Mentor

See SassyNoodle reply about a missing module.

Also, in case you need it, make sure to also activate the avatar_ai_agent' API following these steps:

1) Go to the scripting menu

2) Open the settings (gear icon)

3) Click on the API tab

4) Scroll down and toggle on the horizon/avatar_ai_agent option

Upcoming Events:
Build with a Mentor: Custom UI Thursday 3/20 at 5:00 PM PT Register

March calendar of all Mentor Workshops and Office Hours

SassyNoodle
Member

The error indicates that you are missing the script you're trying to import. It appears you've gotten this code from the documentation and are missing the NPCAgent.ts file. You can grab the code here: https://developers.meta.com/horizon-worlds/learn/documentation/desktop-editor/npcs/npc-scripts

Be sure to enable the horizon/navmesh API as well as the horizon/unity_asset_bundles API since NPCAgent.ts requires it.

Oh good call! It looks like that's a module, not the API

Upcoming Events:
Build with a Mentor: Custom UI Thursday 3/20 at 5:00 PM PT Register

March calendar of all Mentor Workshops and Office Hours