After adding a .ts to the src/scripts folder, I’ll get a console message in Unity that Run codegen for myScript.ts but no new file appears in the components.codegen file and nothing from within Add Component
Further coonsole message in Unity: Node.js not installed or could not be found..
Node is definitely installed as I can start the needle server normally
Hello there – we have an experimental AI bot that might be able to help you with your question. Would you like to try this out?
How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.
It appears that the TypeScript to C# component compiler is not being triggered correctly due to an issue with Node.js detection, even though Node.js is installed. This issue can prevent the code generation process from completing successfully and updating the components.codegen file.
Here’s a troubleshooting plan:
Ensure Node.js is installed globally and that its path is included in the system’s PATH environment variable.
Check if Node.js can be accessed from the command line/terminal by running node -v. If it cannot be found, there might be an issue with the system PATH.
Confirm that the TypeScript file is correctly placed in the src/scripts/ folder and the file does not contain syntax errors.
Ensure that the TypeScript file includes the export keyword, making the class visible for the compiler.
Restart Unity to ensure it picks up any changes to the environment variables (after Node.js installation or PATH adjustments).
If the issue persists, consider reinstalling the Needle Engine package in Unity through the Package Manager to reset any potential configuration issues.
Check Unity’s console for any other related error messages that might indicate the exact cause of the problem.
If available, update Node.js to the latest version, as some tools may have issues with older versions.
If you continue to experience issues after attempting these steps, consider reaching out to the Needle Engine support for further assistance. They might have additional insights or steps to resolve this specific problem with the Node.js detection and TypeScript to C# component compilation process.
Basically I have several variations of the same GameObject with slightly different meshes
I have made turned them into Prefabs and I’m instantiating them with the following:
All the GameObjects will appear normally when they are already in the hierarchy/scene but when they are instantiated, only 2 out of 9 will be visible even though they are all accounted for in gltfinfo
I have no idea how to debug that
And not able to simplify the component in a new script as codegen is not working at the moment
Regarding codegen: can you check the file in your Unity project in “Temp/component-compiler.log” if it contains any information regarding the node error?
Which Needle Engine version are you currently using? Would it be possible to update to the latest exp version ? I’ll try to log further debug info when “debug” is enabled in the ComponentGenerator component in the next engine version