Closed XDelta closed 4 years ago
The only places that the script reference gets assigned in U# is in the UI when you manually change it, and when you create a new script.
Are you sure you don't have a program asset that you're reusing for two different scripts? So you see a broken button in the world with the script set wrong and change it, then later on realize that something else which was incorrectly sharing the program asset is using the button script, so you change it and eventually realize the button is broken again.
Closing due to inactivity and no other reports of this issue. If someone is still having this issue, leave a comment and I'll reopen this. I have also blocked changing the source script on behaviours in more recent versions which will prevent this if this issue was due to user error.
Occasionally upon compiling all UdonSharp programs, I have noticed one or 2 UdonBehaviour scripts would change their 'source script' while keeping its 'program source' asset correct, resulting in a given action suddenly not doing the correct action when I haven't otherwise changed anything.
When hitting compile, one of the recently interacted objects with UdonBehaviour would have its 'source script' replaced with the source script of whichever one I had shown in the inspector. I've had this happen now 4 or so times but can't reliably make it happen and only noticing it when testing in game and suddenly a button that was working in the previous build suddenly stopped working without having touched it at all.
Not sure how else to describe this.