Add preference to always hide script field.#76
Add preference to always hide script field.#76Petethegoat wants to merge 5 commits intoannulusgames:mainfrom
Conversation
Also add tooltip with the method signature, pretty print the method name ( doThing() -> Do Thing ), and make method buttons that do have parameters use any default parameters in the invocation foldout too.
|
Could you please tell me the benefits of this? I don't think we need an option to hide all script fields. The HideScriptField attribute is sufficient. |
|
Personally, I don't find the script field to ever be useful for custom components. Therefore I would like to globally hide it without needing to add the HideScriptField attribute to every one of my components. |
|
One advantage of showing the script field is that you can click on it to highlight the original file. The default should be to always show the script field. (Also in the sense of matching the behavior with Unity.) |
Good point. It might be convenient if selecting the script file was a context menu option, but I think that's out of scope for Alchemy. It's fairly easy to make a simple editor script to handle most cases anyway, so I don't think it's necessary. |
Replicates manually putting the
[HideScriptField]attribute on all monobehaviours.I haven't updated docs - it may be good to mention this setting on the attribute page (https://annulusgames.github.io/Alchemy/articles/en/attributes/hide-script-field.html) and maybe update https://annulusgames.github.io/Alchemy/images/img-project-settings.png that shows the settings screen.
Thanks.
Also, I changed the FindProperty() calls in AlchemySettings.cs to use
nameof(field)instead of strings. Not related to the functionality at all, sorry.