Open rtizzy opened 8 years ago
Hi and thanks for the report!
There can be multiple behavior classes per script so there's no reliable way to know that some text change in a script was a rename of a particular class.
In the long run, it would be nice to have support for intelligent TypeScript refactoring (press F2 to rename a class, etc.) and in that case, we could detect that the class is being renamed and update behavior components accordingly.
Another thing we've wanted to add at some point is to report errors such as a missing behavior class before running the game in an error pane, so that you don't have to discover those at runtime.
@elisee
Possible solution for at least this problem:
Make the panel where you assign behavior automatically refresh it's entire list (as if it was removed and re-added).
The issue is not with the UI, we just can't equate a change in a script's text with a rename of a class. I've outlined a couple avenues for fixing this: either we could make an exception for scripts with a single behavior class in them, or we should implement TypeScript refactoring support.
As described:
Removing the behavior and re-adding it will properly update the name of the class under the behavior tab. .