Skip to content

Conversation

@Petethegoat
Copy link

@Petethegoat Petethegoat commented Mar 26, 2024

image

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.

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.
@nuskey8
Copy link
Member

nuskey8 commented Mar 27, 2024

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.

@Petethegoat
Copy link
Author

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.

@nuskey8
Copy link
Member

nuskey8 commented Mar 30, 2024

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.)

@Petethegoat
Copy link
Author

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.
I've made it off by default as you suggested.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants