-
-
Notifications
You must be signed in to change notification settings - Fork 465
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
support easy buttons #356
base: master
Are you sure you want to change the base?
support easy buttons #356
Conversation
👍👍👍 |
@Artemis-chan |
@Kryloth How did you install the packages and which Unity version? And are you sure reinstalling did not revert the changes? Also could you try adding this git package |
@Artemis-chan I'm installing on Unity 2021.3.22f1, i'm sure that what i installed didn't revert the changes since i took a look at the NaughtyInspector script and there's your changes in there if (!BindEasyButtonDrawer())
{
Debug.LogWarning("EasyButtons drawer definition does not match");
}
else
{
Debug.Log("EASY BUTTON SUCCESS");
} At first when i just installed both the Naughty and Easy, it all works fine and the code even logs the debug If you want to i could show you more from my discord, hit me up at Kry#1580 |
@Artemis-chan |
@Kryloth please be patient, I was busy then taking a break. |
@Artemis-chan oh no worries, sorry i thought you might be forgotting |
@Kryloth oh sorry there was typo in the link try this |
@Artemis-chan |
@Kryloth could you create a new project with the issue present and send me that in a zip file? Just a empty project with just the issue reproduced. I can't seem to produce it. |
@Artemis-chan Looks like i'll have to choose between MyBox and NA with EasyButtons 😞 |
@Kryloth no worries at least you found the cause. |
It is possible to use all 3 on a single project, although with some compromise (foldouts being drawn out of order), the changes are not straight forward as all 3 package source need some changing. The basic idea is to have only one script with [CustomEditor(typeof(Object)] in the whole project. then merge the contents of UnityObjectEditor.cs (MyBox), ObjectEditor.cs (EasyButtton) and NaughtyInspector.cs into one file. |
This PR simply tries to find EasyButtons assembly and draws the buttons in the
NaughtyInspector
through that, if the user does not have EasyButtons installed it acts normally.This is to basically get access to Buttons with parameters and NaughtyInspector overrides drawer from EasyButtons, while using EasyButtons as kind of a plugin for NaughtyAttributes.
It might need a editor restart in my experience if EasyButtons is installed after this.
Though if usage of separate EasyButtons assembly is not wanted, I can write support for the button params separately without any external dependencies some time in the coming weeks.