예제 #1
0
    private void OnEnable()
    {
        list = new ReorderableList(serializedObject,
                                   serializedObject.FindProperty("Passes"),
                                   true, true, true, true);

        //list = new ReorderableList(serializedObject,
        //		serializedObject.FindProperty("Waves"),
        //		true, true, true, true);
        //editors = new Editor[];

        HappyLittleAsset myTarget = target as HappyLittleAsset;

        list.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) =>
        {
            var element = list.serializedProperty.GetArrayElementAtIndex(index);
            rect.y += 2;

            element.serializedObject.Update();
            EditorGUI.PropertyField(
                new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight),
                element, GUIContent.none);
            element.serializedObject.ApplyModifiedProperties();
        };
    }
 public HappyLittleRP(HappyLittleAsset asset)
 {
     happyAsset = asset;
 }