HasInstancing() private method

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

            EnableInstancingField(r);
            return(true);
        }
Example #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);
 }
Example #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);
 }