slavniyteo / one-line

One line property drawer for Unity3d
MIT License
146 stars 12 forks source link

OneLine initializer cant find CurrentInspector in 2019.2a #34

Closed kewur closed 3 years ago

kewur commented 5 years ago

After upgrading to 2019.2a OneLine initializer fails with "OneLine can not initialize Inspector Window Utility. You may experience some performance issues. Please create an issue on https://github.com/slavniyteo/one-line/ and we will repair it."

The problem is that on the Initialize() call the currentInspector window is trying to be reflected and stored in the "window" variable. Unity seems to have removed the "s_CurrentInspectorWindow" field from InspectorWindow.

OneLine still manages to work though so the only problem is performance wise probably.

slavniyteo commented 5 years ago

Thank you for reporting, I'll look at it tomorrow

сб, 30 марта 2019, 19:06 Efe Burak notifications@github.com:

After upgrading to 2019.2a OneLine initializer fails with "OneLine can not initialize Inspector Window Utility. You may experience some performance issues. Please create an issue on https://github.com/slavniyteo/one-line/ and we will repair it."

The problem is that on the Initialize() call the currentInspector window is trying to be reflected and stored in the "window" variable. Unity seems to have removed the "s_CurrentInspectorWindow" field from InspectorWindow.

OneLine still manages to work though so the only problem is performance wise probably.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slavniyteo/one-line/issues/34, or mute the thread https://github.com/notifications/unsubscribe-auth/ARxmNu-BropsP8VX0HzCCPSFhbzhuC3vks5vb4ttgaJpZM4cT0Un .

slavniyteo commented 5 years ago

As you said, the problem is that they`ve removed internal property InspectorWindow.s_CurrentInspectorWindow.

Anyway, it doesn't affect OneLine functionality except it brokes culling optimization (do not draw properties which aren't visible on the window). And you'll leak it only if you manage really big scriptable objects with thousands lines.

Unfortunately I don't work with Unity right now. But whey they release 2019.2 and publish Unity's source code, I'll try to repair this optimization.

I keep this issue open in order to repair this functionality in the future.


To disable the error message, go to Window/OneLineSettings and switch off the Culling column (the second from the right).

slavniyteo commented 3 years ago

Closed with #v0.5.2