Ejemplo n.º 1
0
 private void OnDisable()
 {
     Undo.undoRedoPerformed -= UndoRedoPerformed;
     emittersList            = null;
     sceneGuiCollider        = null;
     //guiClickedGameObject = null;
     //guiClickedTime = 0;
 }
Ejemplo n.º 2
0
        private void OnEnable()
        {
            sceneGuiCollider       = new SceneGUICollider();
            listener               = (TListener)target;
            root                   = UIToolkitHelpers.CreateDefault(serializedObject);
            emittersList           = ScriptableObject.CreateInstance <TEmitterList>();
            emittersList.emitters  = GetEmittersComponents();
            serializedEmittersList = new SerializedObject(emittersList);
            //SerializedProperty serlializedEmitters = serializedEmittersList.FindProperty(nameof(emittersList.emitters));

            //ObjectField addItemField = new ObjectField("Add emitter") { objectType = typeof(TEmitter) };
            //addRemoveList = new AddRemoveList("Emitters: ", serlializedEmitters, addItemField);
            //addRemoveList.RemoveItemAction += AddRemoveList_RemoveItemAction;
            //addRemoveList.AddItemAction += AddRemoveList_AddItemAction;
            //root.Add(addRemoveList);
        }