Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preference to always hide script field. #76

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

@AnnulusGames
Copy link
Owner

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.

@AnnulusGames
Copy link
Owner

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