I couldn’t find anything on this in the answers or forums. I have a script with a very long list of variables that will be accessed by other scripts. It gets really messy because in the editor/component/script inspector its just one huge wall of text.
Is it possible to create headers for groups of variables or blank spaces between variables within a script? For example:
Thanks, I think I’ll use an array as it seems less involved than creating a custom window. Is there a way to change the name: Element 0, etc. to a custom one? Otherwise I’ll make do with noting what elements represent the accessed data. Cheers.
Another thing is to create a JS file that only contains variable declarations. This creates a class with the same name as the JS file, so if the filename was MyClass.js, the class name would be MyClass. You can then declare a variable of that class type in another script:-
var settings: MyClass;
The variables in that class will be accessible from the editor but they will appear with a disclosure triangle as if they were in a “folder”. This is quite a useful way of grouping variables that logically belong together and showing/hiding them separately.