private HelpItem MaterialWarning() { if (materials.Mixed) { return(null); } Material[] array = materials.GetValue <Material[]>(); MeshFilter component = ((MeshRenderer)serializedObject.targetObject).GetComponent <MeshFilter>(); if (component != null && component.sharedMesh != null && array.Length > component.sharedMesh.subMeshCount) { return(new HelpItem(HelpType.Warning, "This renderer has more materials than the Mesh has submeshes. Multiple materials will be applied to the same submesh, which costs performance. Consider using multiple shader passes.")); } return(null); }
public override void Draw(InspectorField field, GUIStyle style) { // GetValue returns null if multi-selection and different values Guid id = field.GetValue <Guid>(); if (id == Guid.Empty) { GUILayout.Label("GUID: --------------"); } else { GUILayout.Label("GUID: " + id.ToString()); } }
private bool ShowBackground() { return(!clearFlags.Mixed && (int)clearFlags.GetValue <CameraClearFlags>() == 2); }
private bool IsUsingLightProbes() { return(!lightProbeUsage.Mixed && lightProbeUsage.GetValue <LightProbeUsage>() != LightProbeUsage.Off); }
private bool IsUsingReflectionProbes() { return(!reflectionProbeUsage.Mixed && reflectionProbeUsage.GetValue <ReflectionProbeUsage>() != ReflectionProbeUsage.Off); }