Exemple #1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            foreach (var property in _serializedProperties)
            {
                if (property.name.Equals("m_Script", System.StringComparison.Ordinal))
                {
                    using (new GUIEnabled(false))
                    {
                        EditorGUILayout.PropertyField(property);
                    }
                }
                else
                {
                    if (property.isArray && property.propertyType != SerializedPropertyType.String)
                    {
                        ReorderableListPropertyDrawer.Draw(property);
                    }
                    else
                    {
                        EditorGUILayout.PropertyField(property, true);
                    }
                }
            }

            serializedObject.ApplyModifiedProperties();
        }
Exemple #2
0
 private void OnDisable()
 {
     foreach (var property in _serializedProperties)
     {
         if (property.isArray && property.propertyType != SerializedPropertyType.String)
         {
             ReorderableListPropertyDrawer.Dispose(property);
         }
     }
 }