Skip to content

Conversation

@lejean
Copy link

@lejean lejean commented Nov 23, 2025

No description provided.

Copy link

@tigran-sargsyan-w tigran-sargsyan-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ShaderUtil calls to shader.GetPropertyCount / GetPropertyType / GetPropertyName looks 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.NonModifiableTextureData check seems like the right replacement for the old IsShaderPropertyNonModifiableTexureProperty usage.

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 👌

@lejean
Copy link
Author

lejean commented Dec 5, 2025

Hey, I added some unity 6 tags

@yasirkula
Copy link
Owner

Thank you for the PR!

  • Can you revert the latest commit? Your ShaderUtil changes are compatible with minimum supported version (2021 LTS) so there's no need to wrap them inside compiler directives.

  • TreeView<int> related stuff can be reverted to the original version because simply adding the following lines underneath the other using statements will suffice (for SearchResult.cs, only TreeViewItem line is sufficient):

#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
  • Instead of fully typing UnityEngine.Rendering.ShaderPropertyType, please add a using UnityEngine.Rendering; statement to the top.

  • While replacing ShaderUtil.IsShaderPropertyNonModifiableTexureProperty, use this instead: shader.GetPropertyFlags( i ) & ShaderPropertyFlags.NonModifiableTextureData != 0

@yasirkula
Copy link
Owner

yasirkula commented Dec 7, 2025

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.

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

Successfully merging this pull request may close these issues.

3 participants