Hello everyone.
Quick question, the title says it all, can I have a script with two monobehaviour classes on it? Then, which one would be attached to the gameObjetct? the one with the name of the script?
Thank you very much
Hello everyone.
Quick question, the title says it all, can I have a script with two monobehaviour classes on it? Then, which one would be attached to the gameObjetct? the one with the name of the script?
Thank you very much
The editor gets confused if you don’t have a class with the same name as the file. In general it is better to keep them separate - although I believe AddComponent can be used to add other classes from the file.