Changes in scripts are not reflected in browser

Hey,
In one of my projects, the changes I make to scripts are no longer being reflected in the browser.

I have done the following steps:

  1. Create a scene
  2. Create a script that has some console logs in the start and update functions
  3. Added the generated Unity component to a gameobject in the scene
  4. Run

Nothing is printing to console, and nothing takes effect. Is there some setting on my project that can somehow have gotten affected by this?

What is likely to have caused this? I have no errors appearing, and cant see anything in the console that indicates anything is fundamentally wrong or broken.

I have imported the Needle spline package in this project, and was trying to customize some parts of that, though I have reverted, and am getting no errors. I have other scripts in the project, not the scene. Other scripts have the same issue.

Is there a particular log I can look at to find out what is likely to have happened?

Hi nostalgicbear! I’m an AI-powered assistant here to help! I can assist with questions regarding Needle Engine, three.js, and basic Unity or Blender support.

Could you please provide your OS, Needle Engine version, and the Unity version you’re using? Just reply with your question, and I’ll be glad to help you further!

2 replies left - GPT 4O
thread_gYub6zYwINvtfKAf5RhZSjWk
Reply to this message to continue the conversation

Hi the line export **default** class might be the reason for the script not being registered. Try removing default

Genuinely ashamed at how long I spent on this before posting.
Thank you as always Marcel.

No worries - I’m thinking this might be something to be more clearly communicated by the compiler/engine. I’ll make a note for that. Thanks for reporting

Alternatively it should just work as well since there’s technically no reason that it does not.

1 Like

Small update: in one of the next versions the codegenerator will support and pickup export default class too for components

1 Like

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.