Update deprecated methods for unity 6#47
Conversation
tigran-sargsyan-w
left a comment
There was a problem hiding this comment.
Here's a possible review comment you can post:
Hey, nice update 👍
From a quick look, the changes make sense for Unity 6:
- Swapping the deprecated
ShaderUtilcalls toshader.GetPropertyCount / GetPropertyType / GetPropertyNamelooks good and keeps the logic the same. - Using the generic
TreeView<int>/TreeViewItem<int>API matches the newer UnityEditor IMGUI TreeView API and keeps the rest of the code pretty clean. - The
ShaderPropertyFlags.NonModifiableTextureDatacheck seems like the right replacement for the oldIsShaderPropertyNonModifiableTexurePropertyusage.
Only thing I’m wondering about is minimal Unity version support for this repo. If it’s still meant to support older versions, you might want some #if UNITY_... guards around the new APIs. If the plugin is moving fully to the newer versions, then this looks fine as-is.
Overall, this feels like a solid pass over the deprecated APIs 👌
|
Hey, I added some unity 6 tags |
|
Thank you for the PR!
#if UNITY_6000_2_OR_NEWER
using TreeView = UnityEditor.IMGUI.Controls.TreeView<int>;
using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using TreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#endif
|
|
Actually nevermind because I'll update the codebase to Unity 6.3 and apparently it requires changing those scripts (again), as well. So I'm closing this PR. |
No description provided.