This commit is contained in:
SoulliesOfficial
2026-07-17 17:46:16 -04:00
parent b00ac27e3a
commit 40fa80cd70
1178 changed files with 51090 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using UnityEditor;
using UnityEngine.Rendering;
namespace NBShaderEditor
{
public static class ShaderGUIUnityCompat
{
public static ShaderPropertyType GetPropertyType(MaterialProperty property)
{
#if UNITY_6000_1_OR_NEWER
return property.propertyType;
#else
#pragma warning disable 0618
return (ShaderPropertyType)property.type;
#pragma warning restore 0618
#endif
}
public static bool HasHdrFlag(MaterialProperty property)
{
#if UNITY_6000_1_OR_NEWER
return (property.propertyFlags & ShaderPropertyFlags.HDR) != 0;
#else
#pragma warning disable 0618
return (((ShaderPropertyFlags)property.flags) & ShaderPropertyFlags.HDR) != 0;
#pragma warning restore 0618
#endif
}
}
}