HasInstancing() private method

private HasInstancing ( Shader s ) : bool
s UnityEngine.Shader
return bool
示例#1
0
        public bool EnableInstancingField()
        {
            if (!ShaderUtil.HasInstancing(m_Shader))
            {
                return(false);
            }
            Rect r = GetControlRectForSingleLine();

            EnableInstancingField(r);
            return(true);
        }
示例#2
0
 internal static bool MaterialsUseInstancingShader(SerializedProperty materialsArray)
 {
     if (materialsArray.hasMultipleDifferentValues)
     {
         return(false);
     }
     for (int i = 0; i < materialsArray.arraySize; i++)
     {
         Material material = materialsArray.GetArrayElementAtIndex(i).objectReferenceValue as Material;
         if (material != null && material.shader != null && ShaderUtil.HasInstancing(material.shader))
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
0
 public bool IsInstancingEnabled()
 {
     return(ShaderUtil.HasInstancing(m_Shader) && (targets[0] as Material).enableInstancing);
 }
 public bool IsInstancingEnabled()
 {
     return(ShaderUtil.HasInstancing(m_Shader) && m_EnableInstancing.boolValue);
 }