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

I cannot use EasyButtons with NaughtyAttributes #19

Open
AlkanAkisu opened this issue Feb 10, 2021 · 3 comments
Open

I cannot use EasyButtons with NaughtyAttributes #19

AlkanAkisu opened this issue Feb 10, 2021 · 3 comments

Comments

@AlkanAkisu
Copy link

AlkanAkisu commented Feb 10, 2021

I think they both use Button Attribute so it makes it to conflict in button method

@rfadeev
Copy link
Contributor

rfadeev commented Feb 10, 2021

Hi,

This is due to Unity not supporting several custom property drawers. The potential solution is to either create your own attribute and property drawer to draw both EasyButtons and NaughtyAttrubutes buttons. Additionally you can check this solution for some ideas: https://forum.unity.com/threads/drawing-a-field-using-multiple-property-drawers.479377/

Hope this helps!

@maferVV
Copy link

maferVV commented Jan 25, 2022

Hi, I'm trying to make NaughtyAttibutes and EasyButtons compatible too. I figured it would be easier to just delete NaughtyAttributes [Button] and leave EasyButton's Button attribute intact. Just deleting the button attribute file is not enough though, because somehow the mere presence of the EasyButtons files on the project makes it as if NaughtyAttributes does not even exist, giving errors about not recognizing the NaughtyAttrinutes name.

If I were to use the solution in the link you posted, where should I implement the new parent scripts and which elements of the plugins should be changed? NaughtyAttributes has even their own custom editor that references all property drawers inside it.
Sorry if my questions are not clear. The big amount of files on each plugin just makes everything seem so convoluted.

@Artemis-chan
Copy link

Artemis-chan commented May 12, 2023

I tried incorporating ButtonDrawer using Type.GetType into NaughtyAttribute's drawer here.
Currently it can be tried by using adding to package manager with the git link
https://github.com/Artemis-chan/NaughtyAttributes.git?path=Assets/NaughtyAttributes#easy-button-support
Also I did it on the optimized fork from nikosassets, which I will be using:
https://github.com/Artemis-chan/NaughtyAttributes.git?path=Assets/NaughtyAttributes#optimized

One issue I found is sometimes if EasyButtons is installed after NaughtyAttributes, EB overrides the drawer until restarted.

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

No branches or pull requests

4 participants