dbrizov / dbrizov/NaughtyAttributes

Many attributes do not work in Unity 2022.2+

Open
#369 13 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
5.2k
Forks
501
PR merge metrics
No merged PRs in 30d

Description

Here is an excerpt from Unity's docs:

Note: You cannot have UI Toolkit running inside IMGUI, which means that if your custom PropertyDrawer only has a UI Toolkit implementation, it will not work inside an IMGUI custom Inspector or a parent IMGUI custom PropertyDrawer. In Unity 2022.2 and above, the default Inspector uses UI Toolkit exclusively in custom PropertyDrawers. Prior to 2022.2, it is recommended that you either implement both IMGUI and UI Toolkit versions of each PropertyDrawer, or make sure they are exclusively used inside custom UI Toolkit inspectors.

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.

  1. ShowNativeProperty
  2. ShowNonSerializedField
  3. Button

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Unity 2022.3 and read Unity's PropertyDrawer documentation, then inspect the implementations of ShowNativeProperty, ShowNonSerializedField, and Button. Done means the listed attributes work in the default Unity 2022.2+ Inspector rather than only in older IMGUI-based contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.