private void CheckInitialize(SerializedProperty property, GUIContent label) { if (m_GuiControl != null) { return; } var attr = attribute as OutfitMaterialTargetGroupAttribute; m_MaterialControl = new RendererMaterialPtrControl(attr.SearchPropertyPath); var settings = new OutfitMaterialListInfo(); settings.ItemDataPropName = "m_Target"; settings.ItemTypePropName = "m_Type"; settings.ListHeaderLabel = label.text; settings.ListElementHeight = EditorGUIUtility.singleLineHeight // For label. + EditorGUIUtility.standardVerticalSpacing * 4 + m_MaterialControl.GetPropertyHeight(property, GUIContent.none); settings.Validate = Validate; settings.DrawElement = DrawElement; settings.AllowMultipleTargets = attr.AllowMultipleTargets; m_GuiControl = new OutfitMaterialListControl(settings); }
private void InititializeElement(SerializedProperty property) { RendererMaterialPtrControl.FindRendererProperty(property).objectReferenceValue = null; RendererMaterialPtrControl.FindIndexProperty(property).intValue = -1; }