diff --git a/Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs b/Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs index 80c8b8f7..ff3bebdc 100644 --- a/Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs +++ b/Assets/Fungus/Scripts/EventHandlers/DragCancelled.cs @@ -14,7 +14,7 @@ namespace Fungus "Drag Cancelled", "The block will execute when the player drags an object and releases it without dropping it on a target object.")] [AddComponentMenu("")] - public class DragCancelled : EventHandler + public class DragCancelled : EventHandler, ISerializationCallbackReceiver { public class DragCancelledEvent { @@ -24,22 +24,14 @@ namespace Fungus DraggableObject = draggableObject; } } - [SerializeField] protected VariableReference draggableRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable draggableRef; [Tooltip("Draggable object to listen for drag events on")] [SerializeField] protected List draggableObjects; [HideInInspector] [SerializeField] protected Draggable2D draggableObject; - void OnValidate() - { - //add any dragableobject already present to list for backwards compatability - if(draggableObject!=null){ - if(!draggableObjects.Contains(draggableObject)){ - draggableObjects.Add(draggableObject); - } - } - } protected EventDispatcher eventDispatcher; @@ -61,6 +53,25 @@ namespace Fungus protected virtual void OnDragCancelledEvent(DragCancelledEvent evt) { OnDragCancelled(evt.DraggableObject); + } + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + //add any dragableobject already present to list for backwards compatability + if (draggableObject != null) + { + if (!draggableObjects.Contains(draggableObject)) + { + draggableObjects.Add(draggableObject); + + } + draggableObject = null; + } + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + } #region Public members @@ -69,11 +80,16 @@ namespace Fungus { if (draggableObjects.Contains(draggableObject)) { - draggableRef.Set(draggableObject.gameObject); + if(draggableRef!=null) + { + draggableRef.Value = draggableObject.gameObject; + } ExecuteBlock(); } } + + public override string GetSummary() { string summary = "Draggable: "; diff --git a/Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs b/Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs index 12f59adf..14d4788e 100644 --- a/Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs +++ b/Assets/Fungus/Scripts/EventHandlers/DragCompleted.cs @@ -14,7 +14,7 @@ namespace Fungus "Drag Completed", "The block will execute when the player drags an object and successfully drops it on a target object.")] [AddComponentMenu("")] - public class DragCompleted : EventHandler + public class DragCompleted : EventHandler, ISerializationCallbackReceiver { public class DragCompletedEvent { @@ -24,8 +24,11 @@ namespace Fungus DraggableObject = draggableObject; } } + [VariableProperty(typeof(GameObjectVariable))] - [SerializeField] protected VariableReference draggableRef; + [SerializeField] protected GameObjectVariable draggableRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable targetRef; [Tooltip("Draggable object to listen for drag events on")] @@ -39,24 +42,8 @@ namespace Fungus [SerializeField] protected Collider2D targetObject; [SerializeField] protected List targetObjects; - [SerializeField] protected VariableReference targetRef; - void OnValidate() - { - //add any dragableobject already present to list for backwards compatability - if(draggableObject!=null){ - if(!draggableObjects.Contains(draggableObject)){ - draggableObjects.Add(draggableObject); - } - } - - if(targetObject!=null){ - if(!targetObjects.Contains(targetObject)){ - targetObjects.Add(targetObject); - } - } - } @@ -111,6 +98,33 @@ namespace Fungus OnDragExited(evt.DraggableObject, evt.TargetCollider); } + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + //add any dragableobject already present to list for backwards compatability + if (draggableObject != null) + { + if (!draggableObjects.Contains(draggableObject)) + { + draggableObjects.Add(draggableObject); + } + } + + if (targetObject != null) + { + if (!targetObjects.Contains(targetObject)) + { + targetObjects.Add(targetObject); + } + } + draggableObject = null; + targetObject = null; + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + #region Public members /// @@ -166,8 +180,14 @@ namespace Fungus // Assume that the player will have to do perform another drag and drop operation // to complete the drag again. This is necessary because we don't get an OnDragExited if the // draggable object is set to be inactive. - draggableRef.Set(draggableObject.gameObject); - targetRef.Set(targetCollider.gameObject); + if(draggableRef!=null) + { + draggableRef.Value = draggableObject.gameObject; + } + if(targetRef!=null) + { + targetRef.Value = draggableObject.gameObject; + } overTarget = false; targetCollider = null; @@ -176,6 +196,7 @@ namespace Fungus } } + public override string GetSummary() { string summary = "Draggable: "; diff --git a/Assets/Fungus/Scripts/EventHandlers/DragEntered.cs b/Assets/Fungus/Scripts/EventHandlers/DragEntered.cs index bb9df3bd..9eea5937 100644 --- a/Assets/Fungus/Scripts/EventHandlers/DragEntered.cs +++ b/Assets/Fungus/Scripts/EventHandlers/DragEntered.cs @@ -15,7 +15,7 @@ namespace Fungus "Drag Entered", "The block will execute when the player is dragging an object which starts touching the target object.")] [AddComponentMenu("")] - public class DragEntered : EventHandler + public class DragEntered : EventHandler, ISerializationCallbackReceiver { public class DragEnteredEvent { @@ -27,9 +27,10 @@ namespace Fungus TargetCollider = targetCollider; } } - - [SerializeField] protected VariableReference draggableRef; - [SerializeField] protected VariableReference targetRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable draggableRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable targetRef; [Tooltip("Draggable object to listen for drag events on")] [HideInInspector] [SerializeField] protected Draggable2D draggableObject; @@ -41,21 +42,6 @@ namespace Fungus [SerializeField] protected Collider2D targetObject; [SerializeField] protected List targetObjects; - void OnValidate() - { - //add any dragableobject already present to list for backwards compatability - if(draggableObject!=null){ - if(!draggableObjects.Contains(draggableObject)){ - draggableObjects.Add(draggableObject); - } - } - - if(targetObject!=null){ - if(!targetObjects.Contains(targetObject)){ - targetObjects.Add(targetObject); - } - } - } protected EventDispatcher eventDispatcher; @@ -88,12 +74,45 @@ namespace Fungus this.draggableObjects.Contains(draggableObject) && this.targetObjects.Contains(targetObject)) { - draggableRef.Set(draggableObject.gameObject); - targetRef.Set(targetObject.gameObject); + if(draggableRef!=null) + { + draggableRef.Value = draggableObject.gameObject; + } + if(targetRef!=null) + { + targetRef.Value = draggableObject.gameObject; + } ExecuteBlock(); } } + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + //add any dragableobject already present to list for backwards compatability + if (draggableObject != null) + { + if (!draggableObjects.Contains(draggableObject)) + { + draggableObjects.Add(draggableObject); + } + } + + if (targetObject != null) + { + if (!targetObjects.Contains(targetObject)) + { + targetObjects.Add(targetObject); + } + } + draggableObject = null; + targetObject = null; + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + public override string GetSummary() { string summary = "Draggable: "; diff --git a/Assets/Fungus/Scripts/EventHandlers/DragExited.cs b/Assets/Fungus/Scripts/EventHandlers/DragExited.cs index 766abcb5..c96ec4d0 100644 --- a/Assets/Fungus/Scripts/EventHandlers/DragExited.cs +++ b/Assets/Fungus/Scripts/EventHandlers/DragExited.cs @@ -14,7 +14,7 @@ namespace Fungus "Drag Exited", "The block will execute when the player is dragging an object which stops touching the target object.")] [AddComponentMenu("")] - public class DragExited : EventHandler + public class DragExited : EventHandler, ISerializationCallbackReceiver { public class DragExitedEvent { @@ -27,8 +27,10 @@ namespace Fungus } } - [SerializeField] protected VariableReference draggableRef; - [SerializeField] protected VariableReference targetRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable draggableRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable targetRef; [Tooltip("Draggable object to listen for drag events on")] [HideInInspector] @@ -41,21 +43,7 @@ namespace Fungus [SerializeField] protected Collider2D targetObject; [SerializeField] protected List targetObjects; - void OnValidate() - { - //add any dragableobject already present to list for backwards compatability - if(draggableObject!=null){ - if(!draggableObjects.Contains(draggableObject)){ - draggableObjects.Add(draggableObject); - } - } - - if(targetObject!=null){ - if(!targetObjects.Contains(targetObject)){ - targetObjects.Add(targetObject); - } - } - } + protected EventDispatcher eventDispatcher; @@ -78,6 +66,33 @@ namespace Fungus OnDragExited(evt.DraggableObject, evt.TargetCollider); } + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + //add any dragableobject already present to list for backwards compatability + if (draggableObject != null) + { + if (!draggableObjects.Contains(draggableObject)) + { + draggableObjects.Add(draggableObject); + } + } + + if (targetObject != null) + { + if (!targetObjects.Contains(targetObject)) + { + targetObjects.Add(targetObject); + } + } + draggableObject = null; + targetObject = null; + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + #region Public members /// @@ -89,12 +104,19 @@ namespace Fungus this.draggableObjects.Contains(draggableObject) && this.targetObjects.Contains(targetObject)) { - draggableRef.Set(draggableObject.gameObject); - targetRef.Set(targetObject.gameObject); + if(draggableRef!=null) + { + draggableRef.Value = draggableObject.gameObject; + } + if(targetRef!=null) + { + targetRef.Value = draggableObject.gameObject; + } ExecuteBlock(); } } + public override string GetSummary() { string summary = "Draggable: "; diff --git a/Assets/Fungus/Scripts/EventHandlers/DragStarted.cs b/Assets/Fungus/Scripts/EventHandlers/DragStarted.cs index 87237bf8..4e8d290b 100644 --- a/Assets/Fungus/Scripts/EventHandlers/DragStarted.cs +++ b/Assets/Fungus/Scripts/EventHandlers/DragStarted.cs @@ -13,7 +13,7 @@ namespace Fungus "Drag Started", "The block will execute when the player starts dragging an object.")] [AddComponentMenu("")] - public class DragStarted : EventHandler + public class DragStarted : EventHandler, ISerializationCallbackReceiver { public class DragStartedEvent { @@ -23,7 +23,8 @@ namespace Fungus DraggableObject = draggableObject; } } - [SerializeField] protected VariableReference draggableRef; + [VariableProperty(typeof(GameObjectVariable))] + [SerializeField] protected GameObjectVariable draggableRef; [SerializeField] protected List draggableObjects; [HideInInspector] @@ -40,19 +41,7 @@ namespace Fungus eventDispatcher.AddListener(OnDragStartedEvent); } - /// - /// Called when the script is loaded or a value is changed in the - /// inspector (Called in the editor only). - /// - void OnValidate() - { - //add any dragableobject already present to list for backwards compatability - if(draggableObject!=null){ - if(!draggableObjects.Contains(draggableObject)){ - draggableObjects.Add(draggableObject); - } - } - } + protected virtual void OnDisable() { @@ -66,6 +55,25 @@ namespace Fungus OnDragStarted(evt.DraggableObject); } + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + //add any dragableobject already present to list for backwards compatability + if (draggableObject != null) + { + if (!draggableObjects.Contains(draggableObject)) + { + draggableObjects.Add(draggableObject); + + } + draggableObject = null; + } + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + #region Public members /// @@ -75,7 +83,10 @@ namespace Fungus { if (draggableObjects.Contains(draggableObject)) { - draggableRef.Set(draggableObject.gameObject); + if(draggableRef!=null) + { + draggableRef.Value = draggableObject.gameObject; + } ExecuteBlock(); } } diff --git a/Assets/dragable_test.unity b/Assets/FungusExamples/DragAndDrop/DragandDrop(DraggableObjectLists).unity similarity index 75% rename from Assets/dragable_test.unity rename to Assets/FungusExamples/DragAndDrop/DragandDrop(DraggableObjectLists).unity index 7097cb43..59a65c22 100644 --- a/Assets/dragable_test.unity +++ b/Assets/FungusExamples/DragAndDrop/DragandDrop(DraggableObjectLists).unity @@ -178,7 +178,7 @@ GameObject: - component: {fileID: 58676544} - component: {fileID: 58676543} m_Layer: 0 - m_Name: DraggableSprite (2) + m_Name: DraggableSprite2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -288,7 +288,7 @@ SpriteRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 0.85346144, g: 0.8679245, b: 0.06959773, a: 1} m_FlipX: 0 m_FlipY: 0 m_DrawMode: 0 @@ -305,12 +305,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 58676542} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -10.33, y: 4.78, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 9 + m_Father: {fileID: 466130441} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &327424025 GameObject: @@ -404,7 +404,7 @@ GameObject: - component: {fileID: 411749770} - component: {fileID: 411749769} m_Layer: 0 - m_Name: DragTargetSprite + m_Name: DragTargetSprite(in_list) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -464,7 +464,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: 05ccd53483a554ca9b31f685fa76154a, type: 3} + m_Sprite: {fileID: 21300000, guid: d18d934d212d442ee90406fd28e6eef6, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -482,12 +482,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 411749768} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -5.03, y: 0.39, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 6 + m_Father: {fileID: 497736456} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &452482469 GameObject: @@ -501,7 +501,7 @@ GameObject: - component: {fileID: 452482471} - component: {fileID: 452482470} m_Layer: 0 - m_Name: DragTargetSprite (1) + m_Name: DragTargetSprite1(in_list) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -561,7 +561,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: 05ccd53483a554ca9b31f685fa76154a, type: 3} + m_Sprite: {fileID: 21300000, guid: d18d934d212d442ee90406fd28e6eef6, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -579,12 +579,78 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 452482469} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 17.78, y: 0.39, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] + m_Father: {fileID: 497736456} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &466130440 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 466130441} + m_Layer: 0 + m_Name: draggableObjects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &466130441 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 466130440} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 823874207} + - {fileID: 1909080567} + - {fileID: 58676547} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &497736455 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 497736456} + m_Layer: 0 + m_Name: targetObjects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &497736456 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 497736455} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 411749771} + - {fileID: 452482472} + - {fileID: 988554616} m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &823874202 GameObject: @@ -600,7 +666,7 @@ GameObject: - component: {fileID: 823874204} - component: {fileID: 823874203} m_Layer: 0 - m_Name: DraggableSprite + m_Name: DraggableSprite(in_list) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -727,12 +793,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 823874202} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 1.31, y: 2.88, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 + m_Father: {fileID: 466130441} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &988554613 GameObject: @@ -746,7 +812,7 @@ GameObject: - component: {fileID: 988554615} - component: {fileID: 988554614} m_Layer: 0 - m_Name: DragTargetSprite (2) + m_Name: DragTargetSprite2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -806,7 +872,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: b14a874c86c5f6345ae0f84ec697575f, type: 3} + m_Sprite: {fileID: 21300000, guid: f2e901e070fff48cda67e3f446d80e79, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -824,12 +890,12 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 988554613} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 10.53, y: -2.48, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 8 + m_Father: {fileID: 497736456} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1077498079 GameObject: @@ -843,9 +909,21 @@ GameObject: - component: {fileID: 1077498083} - component: {fileID: 1077498082} - component: {fileID: 1077498080} - - component: {fileID: 1077498081} - component: {fileID: 1077498086} - component: {fileID: 1077498085} + - component: {fileID: 1077498081} + - component: {fileID: 1077498107} + - component: {fileID: 1077498106} + - component: {fileID: 1077498101} + - component: {fileID: 1077498095} + - component: {fileID: 1077498089} + - component: {fileID: 1077498088} + - component: {fileID: 1077498105} + - component: {fileID: 1077498091} + - component: {fileID: 1077498090} + - component: {fileID: 1077498087} + - component: {fileID: 1077498093} + - component: {fileID: 1077498092} m_Layer: 0 m_Name: Flowchart m_TagString: Untagged @@ -884,30 +962,23 @@ MonoBehaviour: setSayDialog: {fileID: 0} --- !u!114 &1077498081 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1077498079} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8dbb95c9958f04152aa2e7a65413eb4d, type: 3} + m_Script: {fileID: 11500000, guid: 538cc00e40e51400fb9bb5f6d8a9759c, type: 3} m_Name: m_EditorClassIdentifier: parentBlock: {fileID: 1077498082} suppressBlockAutoSelect: 0 - draggableRef: - variable: {fileID: 1077498086} - targetRef: - variable: {fileID: 1077498085} - draggableObject: {fileID: 0} + draggableRef: {fileID: 0} draggableObjects: - {fileID: 823874203} - {fileID: 1909080563} - targetObject: {fileID: 0} - targetObjects: - - {fileID: 411749769} - - {fileID: 452482470} + draggableObject: {fileID: 0} --- !u!114 &1077498082 MonoBehaviour: m_ObjectHideFlags: 2 @@ -922,9 +993,9 @@ MonoBehaviour: m_EditorClassIdentifier: nodeRect: serializedVersion: 2 - x: 68 - y: 70 - width: 325.2 + x: 26.67772 + y: 43.14051 + width: 402.06586 height: 40 tint: {r: 1, g: 1, b: 1, a: 1} useCustomTint: 0 @@ -948,19 +1019,18 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: version: 1 - scrollPos: {x: 0, y: 0} + scrollPos: {x: 550.1149, y: 176.97496} variablesScrollPos: {x: 0, y: 0} variablesExpanded: 1 - blockViewHeight: 400 - zoom: 1 + blockViewHeight: 501 + zoom: 0.48400036 scrollViewRect: serializedVersion: 2 x: -343 y: -340 width: 1114 height: 859 - selectedBlocks: - - {fileID: 1077498082} + selectedBlocks: [] selectedCommands: [] variables: - {fileID: 1077498086} @@ -991,7 +1061,7 @@ Transform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1077498085 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1002,11 +1072,11 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: scope: 0 - key: Var2 + key: Target value: {fileID: 0} --- !u!114 &1077498086 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} @@ -1017,8 +1087,320 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: scope: 0 - key: Var1 + key: GameObject value: {fileID: 0} +--- !u!114 &1077498087 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8dbb95c9958f04152aa2e7a65413eb4d, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1077498089} + suppressBlockAutoSelect: 0 + draggableRef: {fileID: 1077498086} + targetRef: {fileID: 1077498085} + draggableObject: {fileID: 0} + draggableObjects: + - {fileID: 823874203} + - {fileID: 1909080563} + targetObject: {fileID: 0} + targetObjects: + - {fileID: 411749769} + - {fileID: 452482470} +--- !u!114 &1077498088 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 17 + indentLevel: 0 + storyText: 'drag completed + + +' + description: + character: {fileID: 0} + portrait: {fileID: 0} + voiceOverClip: {fileID: 0} + showAlways: 1 + showCount: 1 + extendPrevious: 0 + fadeWhenDone: 1 + waitForClick: 1 + stopVoiceover: 1 + waitForVO: 0 + setSayDialog: {fileID: 0} +--- !u!114 &1077498089 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 386.49557 + y: 195.74385 + width: 402.06586 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 21 + blockName: drag completed + description: + eventHandler: {fileID: 1077498087} + commandList: + - {fileID: 1077498088} + suppressAllAutoSelections: 0 +--- !u!114 &1077498090 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ca6aad5e417a14505886d0b0307bff32, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1077498095} + suppressBlockAutoSelect: 0 + draggableRef: {fileID: 1077498086} + targetRef: {fileID: 1077498085} + draggableObject: {fileID: 0} + draggableObjects: + - {fileID: 823874203} + - {fileID: 1909080563} + targetObject: {fileID: 0} + targetObjects: + - {fileID: 411749769} + - {fileID: 452482470} +--- !u!114 &1077498091 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eed081ad4ebea41c580e1cdd6fe65ba0, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1077498101} + suppressBlockAutoSelect: 0 + draggableRef: {fileID: 1077498086} + targetRef: {fileID: 1077498085} + draggableObject: {fileID: 0} + draggableObjects: + - {fileID: 823874203} + - {fileID: 1909080563} + targetObject: {fileID: 0} + targetObjects: + - {fileID: 411749769} + - {fileID: 452482470} +--- !u!114 &1077498092 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 23 + indentLevel: 0 + storyText: drag exited + description: + character: {fileID: 0} + portrait: {fileID: 0} + voiceOverClip: {fileID: 0} + showAlways: 1 + showCount: 1 + extendPrevious: 0 + fadeWhenDone: 1 + waitForClick: 1 + stopVoiceover: 1 + waitForVO: 0 + setSayDialog: {fileID: 0} +--- !u!114 &1077498093 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 22 + indentLevel: 0 + storyText: drag entered + description: + character: {fileID: 0} + portrait: {fileID: 0} + voiceOverClip: {fileID: 0} + showAlways: 1 + showCount: 1 + extendPrevious: 0 + fadeWhenDone: 1 + waitForClick: 1 + stopVoiceover: 1 + waitForVO: 0 + setSayDialog: {fileID: 0} +--- !u!114 &1077498095 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 609.26447 + y: 92.36371 + width: 402.06586 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 20 + blockName: drag exited + description: + eventHandler: {fileID: 1077498090} + commandList: + - {fileID: 1077498092} + suppressAllAutoSelections: 0 +--- !u!114 &1077498101 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: -68.13205 + y: 152.53719 + width: 402.06586 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 19 + blockName: drag entered + description: + eventHandler: {fileID: 1077498091} + commandList: + - {fileID: 1077498093} + suppressAllAutoSelections: 0 +--- !u!114 &1077498105 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b30a6fae3a8a24fa097a262570f519ce, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1077498107} + suppressBlockAutoSelect: 0 + draggableRef: {fileID: 1077498086} + draggableObjects: + - {fileID: 823874203} + - {fileID: 1909080563} + draggableObject: {fileID: 0} +--- !u!114 &1077498106 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ec422cd568a9c4a31ad7c36d0572b9da, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + indentLevel: 0 + storyText: 'drag cancelled + +' + description: + character: {fileID: 0} + portrait: {fileID: 0} + voiceOverClip: {fileID: 0} + showAlways: 1 + showCount: 1 + extendPrevious: 0 + fadeWhenDone: 1 + waitForClick: 1 + stopVoiceover: 1 + waitForVO: 0 + setSayDialog: {fileID: 0} +--- !u!114 &1077498107 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1077498079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 434.23154 + y: -11.975143 + width: 402.06586 + height: 40 + tint: {r: 1, g: 1, b: 1, a: 1} + useCustomTint: 0 + itemId: 18 + blockName: drag cancelled + description: + eventHandler: {fileID: 1077498105} + commandList: + - {fileID: 1077498106} + suppressAllAutoSelections: 0 --- !u!1 &1269415516 GameObject: m_ObjectHideFlags: 0 @@ -1116,7 +1498,7 @@ GameObject: - component: {fileID: 1909080564} - component: {fileID: 1909080563} m_Layer: 0 - m_Name: DraggableSprite (1) + m_Name: DraggableSprite1(in_list) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -1243,107 +1625,10 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1909080562} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 9.74, y: 4.97, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2029129142 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2029129145} - - component: {fileID: 2029129144} - - component: {fileID: 2029129143} - m_Layer: 0 - m_Name: DragTargetSprite (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!58 &2029129143 -CircleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2029129142} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - serializedVersion: 2 - m_Radius: 1.5 ---- !u!212 &2029129144 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2029129142} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 21300000, guid: b14a874c86c5f6345ae0f84ec697575f, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &2029129145 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2029129142} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -14.38, y: -2.48, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 10 + m_Father: {fileID: 466130441} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/dragable_test.unity.meta b/Assets/FungusExamples/DragAndDrop/DragandDrop(DraggableObjectLists).unity.meta similarity index 100% rename from Assets/dragable_test.unity.meta rename to Assets/FungusExamples/DragAndDrop/DragandDrop(DraggableObjectLists).unity.meta