-
-
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
Many attributes do not work in Unity 2022.2+ #369
Comments
ShowIf/HideIf also do not work with UI Toolkit and Unity 2022.3 |
So I guess that even if it were possible for me to use the Odin inspector
to customize the look and feel of my tools for people that download it (who
may or may not have Odin inspector themselves), it would be problematic
because it would be version dependent?
…On Thu, 16 Nov 2023, 14:26 Roger Crawfis, ***@***.***> wrote:
ShowIf/HideIf also do not work with UI Toolkit and Unity 2022.3
—
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCXLXGITXTR453UIGBUXDOLYEYPBVAVCNFSM6AAAAAA3Y3INVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJUGUZTMMZYHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
If you write custom editor UI that uses either IMGUI or UI Toolkit (not both), then yes your custom inspector won't appear for everyone. You can:
I don't know anything about Odin inspector. Follow-up: NaughtyAttributes already has a full IMGUI implementation, so it needs to add to or replace the implementation with UI Toolkit to support newer Unity versions. |
@emberTrev did enabling that checkbox return your buttons? It doesn't do anything for me on 2022.3.15f |
Can you give a reproducable example? My test works:
public class Cap : MonoBehaviour
{
[ShowNonSerializedField] public static readonly Color red = Color.red;
[ShowNativeProperty] public Color blue => Color.blue;
[Button]
private void EditorButton()
{
Debug.Log("EditorButon");
}
} Update: Got it, but my case is using it with UIKit drawers, the UIKit drawers can not be rendered correctly |
Yes, the issue I am reporting is that the UIKit drawers do not work. Since that is the default setup for newer versions of Unity, people who start new projects will install this extension and see that it doesn't work unless they know or find out about the I realize that to make UIKit work, the author would probably have to re-implement all the features of the extension in UIKit, which would be a lot of work. I guess that is what I am requesting since Unity is missing these features and they are very useful, but I can't use them on my team's project currently. Are you saying it isn't possible to implement the same feature set in UIKit? |
OK after some digging here is the thing
(I'm trying to implement it in my util project and, yes, it's hell lot of pain...) |
I am going to post this again from my original issue. From here: https://docs.unity3d.com/ScriptReference/PropertyDrawer.html
So that's why my expectation would be that you would have to re-implement everything with a UI Toolkit version that has the same behavior as the IMGUI version. Sorry about this work that the Unity upgrade has brought to the surface. I feel like the bearer of bad news. |
Well, agreed... I just adapted my project (If you like it please give a star, thanks!) And my experience about UI Toolkit as an editor extension, is painful. Yes it's delightful how easy to handle elements and style, but most things are missing for editor. I quote from my project's README:
My project is very new and not fully tested. For people who want a stable editor plus UI Toolkit? Yeah, just pay for OdinInspector... Edit: Oh, and also, when leaving an |
I have also tried this and I can say that Foldout doesn't work for me. I' on Unity 2022.3.20f1. Sucks, because this really looked like a powerful tool that I could use. Even Using IMGUI tickbox to either true or false, nothing appears. Foldouts don't work at all. |
Well, after half years, 50+ literation, I have fixed many issues in SaintsField and I personally feel it's stable, well, at least in my personal projects and company projects. It's a hell lot of pain to adapted to UI Toolkit. You may have a try, at this point it already has almost all features of NaughtyAttributs plus more |
Here is an excerpt from Unity's docs:
https://docs.unity3d.com/ScriptReference/PropertyDrawer.html
I added NaughtyAttributes to my project (running 2022.3) and these are the attributes that I noticed did nothing. There are probably more.
The text was updated successfully, but these errors were encountered: