├── .github └── workflows │ └── autotag.yml ├── .gitignore ├── Editor.meta ├── Editor ├── EdgeGUI.cs ├── EdgeGUI.cs.meta ├── EdgeTriggersTracker.cs ├── EdgeTriggersTracker.cs.meta ├── EditorZoomArea.cs ├── EditorZoomArea.cs.meta ├── EventCall.cs ├── EventCall.cs.meta ├── EventVisualizer.asmdef ├── EventVisualizer.asmdef.meta ├── EventsGraph.cs ├── EventsGraph.cs.meta ├── EventsGraphGUI.cs ├── EventsGraphGUI.cs.meta ├── EventsGraphWindow.cs ├── EventsGraphWindow.cs.meta ├── EventsVisualizer.cs ├── EventsVisualizer.cs.meta ├── FindInGraphButton.cs ├── FindInGraphButton.cs.meta ├── NodeData.cs ├── NodeData.cs.meta ├── NodeGUI.cs ├── NodeGUI.cs.meta ├── PuppyEditor.meta ├── PuppyEditor │ ├── EditorHelper.cs │ └── EditorHelper.cs.meta ├── RectExtensions.cs ├── RectExtensions.cs.meta ├── gui scene skin.guiskin ├── gui scene skin.guiskin.meta ├── white.png └── white.png.meta ├── LICENSE.md ├── LICENSE.md.meta ├── README.md ├── ReadMe.md.meta ├── Samples~ └── GeneralEvents │ ├── CustomEventTest.cs │ ├── CustomEventTest.cs.meta │ ├── EventVisualizer.Demo.asmdef │ ├── EventVisualizer.Demo.asmdef.meta │ ├── EventVisualizerDemo.unity │ ├── EventVisualizerDemo.unity.meta │ ├── ScriptableObjectEventTest.cs │ ├── ScriptableObjectEventTest.cs.meta │ ├── TestSO.asset │ └── TestSO.asset.meta ├── package.json └── package.json.meta /.github/workflows/autotag.yml: -------------------------------------------------------------------------------- 1 | name: Create Tag 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - uses: Klemensas/action-autotag@stable 14 | with: 15 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 673c745b2caa2404db48f4bde78840d8 3 | folderAsset: yes 4 | timeCreated: 1499875042 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/EdgeGUI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEditor; 4 | using UnityEditor.Graphs; 5 | using UnityEngine; 6 | using Graphs = UnityEditor.Graphs; 7 | 8 | namespace EventVisualizer.Base 9 | { 10 | // Specialized edge drawer class 11 | public class EdgeGUI : Graphs.IEdgeGUI 12 | { 13 | #region Public members 14 | 15 | public Graphs.GraphGUI host { get; set; } 16 | public List edgeSelection { get; set; } 17 | 18 | public EdgeGUI() 19 | { 20 | edgeSelection = new List(); 21 | } 22 | 23 | #endregion 24 | 25 | #region IEdgeGUI implementation 26 | 27 | 28 | public void DoEdges() 29 | { 30 | // Draw edges on repaint. 31 | if (Event.current.type == EventType.Repaint) 32 | { 33 | foreach (var edge in host.graph.edges) 34 | { 35 | if (edge == _moveEdge) continue; 36 | 37 | Vector2Int indexes = FindSlotIndexes(edge); 38 | DrawEdge(edge, indexes, ColorForIndex(edge.fromSlotName)); 39 | } 40 | } 41 | } 42 | private Vector2Int FindSlotIndexes(Edge edge) 43 | { 44 | Vector2Int indexes = Vector2Int.zero; 45 | 46 | int totalOutputs = 0; 47 | bool found = false; 48 | foreach(var slot in edge.fromSlot.node.outputSlots) 49 | { 50 | if(slot != edge.fromSlot && !found) 51 | { 52 | indexes.x++; 53 | } 54 | else 55 | { 56 | found = true; 57 | } 58 | totalOutputs++; 59 | } 60 | indexes.x = totalOutputs - indexes.x-1; 61 | 62 | foreach (var slot in edge.toSlot.node.inputSlots) 63 | { 64 | if (slot != edge.toSlot) 65 | { 66 | indexes.y++; 67 | } 68 | else 69 | { 70 | break; 71 | } 72 | } 73 | 74 | return indexes; 75 | } 76 | 77 | public static Color ColorForIndex(string name) 78 | { 79 | int hash = Math.Abs(Animator.StringToHash(name)); 80 | return Color.HSVToRGB((float) (hash / (double) int.MaxValue), 1f, 1f); 81 | } 82 | 83 | public void DoDraggedEdge() 84 | { 85 | 86 | } 87 | 88 | public void BeginSlotDragging(Graphs.Slot slot, bool allowStartDrag, bool allowEndDrag) 89 | { 90 | 91 | } 92 | 93 | public void SlotDragging(Graphs.Slot slot, bool allowEndDrag, bool allowMultiple) 94 | { 95 | 96 | } 97 | 98 | public void EndSlotDragging(Graphs.Slot slot, bool allowMultiple) 99 | { 100 | 101 | } 102 | 103 | 104 | public void EndDragging() 105 | { 106 | 107 | } 108 | 109 | public Graphs.Edge FindClosestEdge() 110 | { 111 | return null; 112 | } 113 | 114 | 115 | #endregion 116 | 117 | #region Private members 118 | 119 | Graphs.Edge _moveEdge; 120 | Graphs.Slot _dragSourceSlot; 121 | Graphs.Slot _dropTarget; 122 | 123 | #endregion 124 | 125 | #region Edge drawer 126 | 127 | public const float kEdgeWidth = 6; 128 | 129 | static void DrawEdge(Edge edge, Vector2Int indexes, Color color) 130 | { 131 | var p1 = GetPositionAsFromSlot(edge.fromSlot, indexes.x); 132 | var p2 = GetPositionAsToSlot(edge.toSlot, indexes.y); 133 | DrawEdge(p1, p2, color * edge.color, EdgeTriggersTracker.GetTimings(edge)); 134 | } 135 | 136 | static void DrawEdge(Vector2 p1, Vector2 p2, Color color, List triggers) 137 | { 138 | Color prevColor = Handles.color; 139 | Handles.color = color; 140 | 141 | var l = Mathf.Min(Mathf.Abs(p1.y - p2.y), 50); 142 | Vector2 p3 = p1 + new Vector2(l, 0); 143 | Vector2 p4 = p2 - new Vector2(l, 0); 144 | var texture = (Texture2D)Graphs.Styles.selectedConnectionTexture.image; 145 | Handles.DrawBezier(p1, p2, p3, p4, color, texture, kEdgeWidth); 146 | 147 | 148 | foreach (var trigger in triggers) 149 | { 150 | Vector3 pos = CalculateBezierPoint(trigger, p1, p3, p4, p2); 151 | Handles.DrawSolidArc(pos, Vector3.back, pos + Vector3.up, 360, kEdgeWidth ); 152 | 153 | } 154 | 155 | Handles.color = prevColor; 156 | } 157 | 158 | #endregion 159 | 160 | #region Utilities to access private members 161 | 162 | const float kEdgeBottomMargin = 4; 163 | const float kNodeTitleSpace = 36; 164 | const float kNodeEdgeSeparation = 12; 165 | 166 | static Vector2 GetPositionAsFromSlot(Slot slot, int index) 167 | { 168 | NodeGUI node = slot.node as NodeGUI; 169 | Vector2 pos = node.position.position; 170 | 171 | pos.y = node.position.yMax - kEdgeBottomMargin; 172 | pos.y -= kNodeEdgeSeparation * index; 173 | 174 | pos.x = node.position.xMax; 175 | 176 | return pos; 177 | } 178 | 179 | static Vector2 GetPositionAsToSlot(Slot slot, int index) 180 | { 181 | NodeGUI node = slot.node as NodeGUI; 182 | Vector2 pos = node.position.position; 183 | pos.y += kNodeTitleSpace; 184 | pos.y += kNodeEdgeSeparation * index; 185 | pos.x = node.position.x; 186 | 187 | return pos; 188 | } 189 | 190 | #endregion 191 | 192 | public static Vector3 CalculateBezierPoint(float t, Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3) 193 | { 194 | float u = 1.0f - t; 195 | float tt = t * t; 196 | float uu = u * u; 197 | float uuu = uu * u; 198 | float ttt = tt * t; 199 | 200 | Vector3 p = uuu * p0; 201 | p += 3 * uu * t * p1; 202 | p += 3 * u * tt * p2; 203 | p += ttt * p3; 204 | 205 | return p; 206 | } 207 | } 208 | 209 | } 210 | -------------------------------------------------------------------------------- /Editor/EdgeGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24716a188674d4449a2ec3ca3f5fc46c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EdgeTriggersTracker.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEditor.Graphs; 4 | using UnityEngine; 5 | using UnityEngine.Events; 6 | 7 | namespace EventVisualizer.Base 8 | { 9 | public static class EdgeTriggersTracker 10 | { 11 | public class EdgeTrigger 12 | { 13 | public EventCall eventCall; 14 | public Edge edge; 15 | public float triggeredTime; 16 | } 17 | 18 | public static readonly float TimeToLive = 1f; 19 | private static List triggers = new List(); 20 | 21 | public static void RegisterTrigger(Edge edge, EventCall eventCall) 22 | { 23 | triggers.Add(new EdgeTrigger() { edge = edge, eventCall = eventCall, triggeredTime = Time.unscaledTime }); 24 | } 25 | 26 | public static List GetTimings(EventCall eventCall) { 27 | float now = Time.unscaledTime; 28 | List acceptedTriggers = triggers.FindAll(t => t.eventCall == eventCall); 29 | return GetTimings(acceptedTriggers); 30 | } 31 | 32 | public static List GetTimings(Edge edge) { 33 | List acceptedTriggers = triggers.FindAll(t => t.edge == edge); 34 | return GetTimings(acceptedTriggers); 35 | } 36 | 37 | private static List GetTimings(List acceptedTriggers) { 38 | float now = Time.unscaledTime; 39 | List timings = new List();//TODO cache 40 | foreach (EdgeTrigger t in acceptedTriggers) { 41 | float time = Mathf.Abs(t.triggeredTime - now) / TimeToLive; 42 | if (time <= 1f) { 43 | timings.Add(time); 44 | } 45 | else { 46 | triggers.Remove(t); 47 | } 48 | } 49 | return timings; 50 | } 51 | 52 | public static void CleanObsolete() 53 | { 54 | float now = Time.unscaledTime; 55 | triggers.RemoveAll(trigger => Mathf.Abs(now - trigger.triggeredTime) > TimeToLive); 56 | } 57 | 58 | public static bool HasData() 59 | { 60 | return triggers.Count > 0; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /Editor/EdgeTriggersTracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57a57526436160744ba47854e093c284 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EditorZoomArea.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace EventVisualizer.Base 4 | { 5 | public class EditorZoomArea 6 | { 7 | private const float kEditorWindowTabHeight = 21.0f; 8 | private static Matrix4x4 _prevGuiMatrix; 9 | 10 | public static Rect Begin(float zoomScale, Rect screenCoordsArea) 11 | { 12 | GUI.EndGroup(); // End the group Unity begins automatically for an EditorWindow to clip out the window tab. This allows us to draw outside of the size of the EditorWindow. 13 | 14 | Rect clippedArea = screenCoordsArea.ScaleSizeBy(1.0f / zoomScale, screenCoordsArea.TopLeft()); 15 | clippedArea.y += kEditorWindowTabHeight; 16 | GUI.BeginGroup(clippedArea); 17 | 18 | _prevGuiMatrix = GUI.matrix; 19 | Matrix4x4 translation = Matrix4x4.TRS(clippedArea.TopLeft(), Quaternion.identity, Vector3.one); 20 | Matrix4x4 scale = Matrix4x4.Scale(new Vector3(zoomScale, zoomScale, 1.0f)); 21 | GUI.matrix = translation * scale * translation.inverse * GUI.matrix; 22 | 23 | return clippedArea; 24 | } 25 | 26 | public static void End() 27 | { 28 | GUI.matrix = _prevGuiMatrix; 29 | GUI.EndGroup(); 30 | GUI.BeginGroup(new Rect(0.0f, kEditorWindowTabHeight, Screen.width, Screen.height)); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Editor/EditorZoomArea.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 740582e9454097243a1e7bb1aa2e503f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EventCall.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Text.RegularExpressions; 3 | using UnityEditor; 4 | using UnityEngine; 5 | using UnityEngine.Events; 6 | 7 | namespace EventVisualizer.Base 8 | { 9 | [System.Serializable] 10 | public class EventCall 11 | { 12 | public readonly Object sender; 13 | public readonly Object receiver; 14 | public readonly string eventShortName; 15 | public readonly string eventFullName; 16 | public readonly string method; 17 | public string ReceiverComponentName { get; private set; } 18 | public string ReceiverComponentNameSimple { get; private set; } 19 | 20 | public NodeData nodeSender; 21 | public NodeData nodeReceiver; 22 | public double lastTimeExecuted { get; private set; } 23 | public int timesExecuted { get; private set; } 24 | public readonly Color color; 25 | public readonly UnityEventBase unityEvent; 26 | 27 | public string MethodFullPath 28 | { 29 | get 30 | { 31 | return ReceiverComponentName + "." + method; 32 | } 33 | } 34 | 35 | public System.Action OnTriggered; 36 | 37 | private static Regex parenteshesPattern = new Regex(@"\(([^\(]*)\)$"); 38 | 39 | public EventCall(Object sender, Object receiver, string eventShortName, string eventFullName, string methodName, UnityEventBase unityEvent) 40 | { 41 | this.sender = sender as Component ? (sender as Component).gameObject : sender; 42 | this.receiver = receiver as Component ? (receiver as Component).gameObject : receiver; 43 | this.eventShortName = eventShortName; 44 | this.eventFullName = eventFullName; 45 | method = methodName; 46 | color = EdgeGUI.ColorForIndex(this.eventShortName); 47 | this.unityEvent = unityEvent; 48 | 49 | UpdateReceiverComponentName(receiver); 50 | AttachTrigger(unityEvent); 51 | } 52 | 53 | private void AttachTrigger(UnityEventBase unityEvent) 54 | { 55 | if (unityEvent == null) 56 | { 57 | return; 58 | } 59 | MethodInfo eventRegisterMethod = unityEvent.GetType().GetMethod("AddListener"); 60 | if (eventRegisterMethod != null) 61 | { 62 | System.Type eventType = eventRegisterMethod.GetParameters()[0].ParameterType; 63 | ParameterInfo[] eventParameters = eventType.GetMethod("Invoke").GetParameters(); 64 | 65 | if (eventParameters.Length == 0) 66 | { 67 | MethodInfo methodInfo = this.GetType() 68 | .GetMethod("TriggerZeroArgs", BindingFlags.Public | BindingFlags.Instance); 69 | 70 | System.Type actionT = typeof(UnityAction); 71 | System.Delegate triggerAction = System.Delegate.CreateDelegate(actionT, this, methodInfo); 72 | 73 | eventRegisterMethod.Invoke(unityEvent, new object[] 74 | { 75 | triggerAction 76 | }); 77 | } 78 | 79 | else if (eventParameters.Length == 1) 80 | { 81 | System.Type t0 = eventParameters[0].ParameterType; 82 | 83 | MethodInfo methodInfo = this.GetType() 84 | .GetMethod("TriggerOneArg", BindingFlags.Public | BindingFlags.Instance) 85 | .MakeGenericMethod(t0); 86 | 87 | System.Type actionT = typeof(UnityAction<>).MakeGenericType(t0); 88 | System.Delegate triggerAction = System.Delegate.CreateDelegate(actionT, this, methodInfo); 89 | 90 | eventRegisterMethod.Invoke(unityEvent, new object[] 91 | { 92 | triggerAction 93 | }); 94 | } 95 | else if (eventParameters.Length == 2) 96 | { 97 | System.Type t0 = eventParameters[0].ParameterType; 98 | System.Type t1 = eventParameters[1].ParameterType; 99 | 100 | MethodInfo methodInfo = this.GetType() 101 | .GetMethod("TriggerTwoArgs", BindingFlags.Public | BindingFlags.Instance) 102 | .MakeGenericMethod(t0, t1); 103 | 104 | System.Type actionT = typeof(UnityAction<,>).MakeGenericType(t0, t1); 105 | System.Delegate triggerAction = System.Delegate.CreateDelegate(actionT, this, methodInfo); 106 | 107 | eventRegisterMethod.Invoke(unityEvent, new object[] 108 | { 109 | triggerAction 110 | }); 111 | } 112 | else if (eventParameters.Length == 3) 113 | { 114 | System.Type t0 = eventParameters[0].ParameterType; 115 | System.Type t1 = eventParameters[1].ParameterType; 116 | System.Type t2 = eventParameters[2].ParameterType; 117 | 118 | MethodInfo methodInfo = this.GetType() 119 | .GetMethod("TriggerThreeArgs", BindingFlags.Public | BindingFlags.Instance) 120 | .MakeGenericMethod(t0, t1,t2); 121 | 122 | System.Type actionT = typeof(UnityAction<,,>).MakeGenericType(t0, t1,t2); 123 | System.Delegate triggerAction = System.Delegate.CreateDelegate(actionT, this, methodInfo); 124 | 125 | eventRegisterMethod.Invoke(unityEvent, new object[] 126 | { 127 | triggerAction 128 | }); 129 | } 130 | else if (eventParameters.Length == 2) 131 | { 132 | System.Type t0 = eventParameters[0].ParameterType; 133 | System.Type t1 = eventParameters[1].ParameterType; 134 | System.Type t2 = eventParameters[2].ParameterType; 135 | System.Type t3 = eventParameters[3].ParameterType; 136 | 137 | MethodInfo methodInfo = this.GetType() 138 | .GetMethod("TriggerFourArgs", BindingFlags.Public | BindingFlags.Instance) 139 | .MakeGenericMethod(t0, t1,t2,t3); 140 | 141 | System.Type actionT = typeof(UnityAction<,,,>).MakeGenericType(t0, t1, t2,t3); 142 | System.Delegate triggerAction = System.Delegate.CreateDelegate(actionT, this, methodInfo); 143 | 144 | eventRegisterMethod.Invoke(unityEvent, new object[] 145 | { 146 | triggerAction 147 | }); 148 | } 149 | } 150 | } 151 | 152 | #region generic callers 153 | public void TriggerZeroArgs() 154 | { 155 | OnExecuted(); 156 | if (OnTriggered != null) 157 | { 158 | OnTriggered.Invoke(); 159 | } 160 | } 161 | 162 | public void TriggerOneArg(T0 arg0) 163 | { 164 | OnExecuted(); 165 | if (OnTriggered != null) 166 | { 167 | OnTriggered.Invoke(); 168 | } 169 | } 170 | public void TriggerTwoArgs(T0 arg0, T1 arg1) 171 | { 172 | OnExecuted(); 173 | if (OnTriggered != null) 174 | { 175 | OnTriggered.Invoke(); 176 | } 177 | } 178 | public void TriggerThreeArgs(T0 arg,T1 arg1, T2 arg2) 179 | { 180 | OnExecuted(); 181 | if (OnTriggered != null) 182 | { 183 | OnTriggered.Invoke(); 184 | } 185 | } 186 | public void TriggerFourArgs(T0 arg, T1 arg1, T2 arg2, T3 arg3) 187 | { 188 | OnExecuted(); 189 | if (OnTriggered != null) 190 | { 191 | OnTriggered.Invoke(); 192 | } 193 | } 194 | 195 | private void OnExecuted() { 196 | timesExecuted++; 197 | lastTimeExecuted = EditorApplication.timeSinceStartup; 198 | } 199 | #endregion 200 | 201 | private void UpdateReceiverComponentName(Object component) 202 | { 203 | if (receiver != null) 204 | { 205 | MatchCollection matches = parenteshesPattern.Matches(component.ToString()); 206 | if (matches != null && matches.Count == 1) 207 | { 208 | ReceiverComponentName = matches[0].Value; 209 | ReceiverComponentName = ReceiverComponentName.Substring(1, ReceiverComponentName.Length - 2); 210 | int lastDot = ReceiverComponentName.LastIndexOf('.') + 1; 211 | ReceiverComponentNameSimple = ReceiverComponentName.Substring(lastDot, ReceiverComponentName.Length - lastDot); 212 | } 213 | } 214 | } 215 | 216 | 217 | public override bool Equals(object obj) { 218 | var ec = (EventCall) obj; 219 | return null != ec && ec.unityEvent == unityEvent && receiver == ec.receiver && method == ec.method; 220 | } 221 | 222 | public override int GetHashCode() { 223 | return unityEvent == null ? 0 : unityEvent.GetHashCode() ^ (receiver == null ? 0 : receiver.GetHashCode() ^ method.GetHashCode()); 224 | } 225 | } 226 | } -------------------------------------------------------------------------------- /Editor/EventCall.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9a31c3ec17359c4184082738f092498 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EventVisualizer.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EventVisualizer", 3 | "references": [], 4 | "optionalUnityReferences": [], 5 | "includePlatforms": [ 6 | "Editor" 7 | ], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [] 14 | } -------------------------------------------------------------------------------- /Editor/EventVisualizer.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64c2793f320f60e42b03db19f6ed1408 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/EventsGraph.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using UnityEditor.Graphs; 4 | using System.Linq; 5 | using UnityEditor; 6 | 7 | namespace EventVisualizer.Base 8 | { 9 | [System.Serializable] 10 | public class EventsGraph : Graph 11 | { 12 | private const int WARNING_CALLS_THRESOLD = 1000; 13 | private GameObject[] selectedRoots; 14 | private bool searchingHierarchy; 15 | 16 | static public EventsGraph Create() 17 | { 18 | var graph = CreateInstance(); 19 | graph.hideFlags = HideFlags.HideAndDontSave; 20 | return graph; 21 | } 22 | 23 | public EventsGraphGUI GetEditor() 24 | { 25 | var gui = CreateInstance(); 26 | gui.graph = this; 27 | gui.hideFlags = HideFlags.HideAndDontSave; 28 | return gui; 29 | 30 | } 31 | 32 | public void RebuildGraph(GameObject[] roots, bool searchHierarchy) 33 | { 34 | this.selectedRoots = roots; 35 | this.searchingHierarchy = searchHierarchy; 36 | BuildGraph(selectedRoots, searchHierarchy); 37 | SortGraph(nodes,false); 38 | } 39 | 40 | public void RefreshGraphConnections() 41 | { 42 | Dictionary positions = new Dictionary(); 43 | List adriftNodes = new List(); 44 | foreach (NodeGUI node in nodes) 45 | { 46 | positions.Add(node.name, node.position); 47 | } 48 | BuildGraph(this.selectedRoots, this.searchingHierarchy); 49 | 50 | foreach (NodeGUI node in nodes) 51 | { 52 | if(positions.ContainsKey(node.name)) 53 | { 54 | node.position = positions[node.name]; 55 | } 56 | else 57 | { 58 | adriftNodes.Add(node); 59 | } 60 | } 61 | SortGraph(adriftNodes,true); 62 | } 63 | 64 | private void BuildGraph(GameObject[] roots, bool searchHierarchy) 65 | { 66 | NodeData.ClearAll(); 67 | Clear(true); 68 | List calls = EventsFinder.FindAllEvents(roots, searchHierarchy); 69 | if(calls.Count > WARNING_CALLS_THRESOLD) 70 | { 71 | bool goAhead = EditorUtility.DisplayDialog("Confirm massive graph", 72 | "You are about to generate a graph with "+ calls.Count+" events.\n" 73 | + "Tip: You can select some gameobjects and search events in just those or their children instead.", 74 | "Go ahead", 75 | "Abort"); 76 | 77 | if(goAhead) 78 | { 79 | GenerateGraphFromCalls(calls); 80 | } 81 | } 82 | else 83 | { 84 | GenerateGraphFromCalls(calls); 85 | } 86 | } 87 | 88 | private void GenerateGraphFromCalls(List calls) 89 | { 90 | foreach (EventCall call in calls) 91 | { 92 | NodeData.RegisterEvent(call); 93 | } 94 | 95 | foreach (NodeData data in NodeData.Nodes) 96 | { 97 | NodeGUI node = NodeGUI.Create(data); 98 | if (!nodes.Contains(node)) 99 | { 100 | AddNode(node); 101 | } 102 | } 103 | foreach (NodeGUI node in nodes) 104 | { 105 | node.PopulateEdges(); 106 | } 107 | } 108 | 109 | #region sorting 110 | 111 | [SerializeField] 112 | private HashSet positionedNodes = new HashSet(); 113 | private const float VERTICAL_SPACING = 80f; 114 | private const float HORIZONTAL_SPACING = 400f; 115 | private void SortGraph(List nodes, bool skipParents) 116 | { 117 | positionedNodes.Clear(); 118 | 119 | List sortedNodes = new List(nodes); //cannot sort the original collection so a clone is needed 120 | sortedNodes.Sort((x, y) => 121 | { 122 | int xScore = x.outputEdges.Count() - x.inputEdges.Count(); 123 | int yScore = y.outputEdges.Count() - y.inputEdges.Count(); 124 | return yScore.CompareTo(xScore); 125 | }); 126 | 127 | Vector2 position = Vector2.zero; 128 | foreach (UnityEditor.Graphs.Node node in sortedNodes) 129 | { 130 | if (!positionedNodes.Contains(node)) 131 | { 132 | positionedNodes.Add(node); 133 | position.y += PositionNodeHierarchy(node, position, skipParents); 134 | } 135 | } 136 | } 137 | 138 | 139 | private float PositionNodeHierarchy(UnityEditor.Graphs.Node currentNode, Vector2 masterPosition, bool skipParents) 140 | { 141 | float height = VERTICAL_SPACING; 142 | if (!skipParents) 143 | { 144 | foreach (var outputEdge in currentNode.outputEdges) 145 | { 146 | UnityEditor.Graphs.Node node = outputEdge.toSlot.node; 147 | if (!positionedNodes.Contains(node)) 148 | { 149 | positionedNodes.Add(node); 150 | height += PositionNodeHierarchy(node, masterPosition 151 | + Vector2.right * HORIZONTAL_SPACING 152 | + Vector2.up * height, skipParents); 153 | } 154 | } 155 | } 156 | currentNode.position = new Rect(masterPosition + Vector2.up * height * 0.5f, currentNode.position.size); 157 | 158 | return height; 159 | } 160 | 161 | #endregion 162 | 163 | } 164 | } -------------------------------------------------------------------------------- /Editor/EventsGraph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a48afff5ab5b4244f86f43a26d925a16 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EventsGraphGUI.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using EventVisualizer.Base; 4 | using System.Collections.Generic; 5 | using UnityEditor.Graphs; 6 | 7 | namespace EventVisualizer.Base 8 | { 9 | [System.Serializable] 10 | public class EventsGraphGUI : GraphGUI 11 | { 12 | [SerializeField] 13 | public int SelectionOverride; 14 | 15 | public override void OnGraphGUI() 16 | { 17 | 18 | // Show node subwindows. 19 | m_Host.BeginWindows(); 20 | 21 | foreach (var node in graph.nodes) 22 | { 23 | // Recapture the variable for the delegate. 24 | var node2 = node; 25 | 26 | // Subwindow style (active/nonactive) 27 | var isActive = selection.Contains(node); 28 | var style = Styles.GetNodeStyle(node.style, node.color, isActive); 29 | 30 | node.position = GUILayout.Window( 31 | node.GetInstanceID(), 32 | node.position, 33 | delegate { NodeGUI(node2); }, 34 | node.title, 35 | style, 36 | GUILayout.Width(150) 37 | ); 38 | } 39 | 40 | if (graph.nodes.Count == 0) 41 | { 42 | GUILayout.Window(0, new Rect(0, 0, 1, 1), delegate {}, "", "MiniLabel"); 43 | } 44 | 45 | m_Host.EndWindows(); 46 | 47 | // Graph edges 48 | edgeGUI.DoEdges(); 49 | 50 | 51 | // Mouse drag 52 | #if UNITY_2017 || UNITY_2017_1_OR_NEWER 53 | DragSelection(); 54 | #else 55 | DragSelection(new Rect(-5000, -5000, 10000, 10000)); 56 | #endif 57 | 58 | } 59 | 60 | public override IEdgeGUI edgeGUI 61 | { 62 | get 63 | { 64 | if (m_EdgeGUI == null) 65 | m_EdgeGUI = new EdgeGUI { host = this }; 66 | return m_EdgeGUI; 67 | } 68 | } 69 | 70 | 71 | 72 | 73 | public override void NodeGUI(UnityEditor.Graphs.Node node) 74 | { 75 | SelectNode(node); 76 | 77 | foreach (var slot in node.inputSlots) 78 | LayoutSlot(slot, slot.title, false, true, true, Styles.triggerPinIn); 79 | 80 | node.NodeUI(this); 81 | 82 | foreach (var slot in node.outputSlots) 83 | { 84 | EditorGUILayout.BeginHorizontal(); 85 | GUILayout.FlexibleSpace(); 86 | LayoutSlot(slot, slot.title, true, false, true, Styles.triggerPinOut); 87 | EditorGUILayout.EndHorizontal(); 88 | } 89 | 90 | DragNodes(); 91 | 92 | UpdateSelection(); 93 | } 94 | 95 | private void UpdateSelection() 96 | { 97 | OverrideSelection(); 98 | if (selection.Count > 0) 99 | { 100 | int[] selectedIds = new int[selection.Count]; 101 | for (int i = 0; i < selection.Count; i++) 102 | { 103 | if(selection[i] != null) 104 | { 105 | selectedIds[i] = int.Parse(selection[i].name); 106 | } 107 | } 108 | Selection.instanceIDs = selectedIds; 109 | } 110 | } 111 | 112 | private void OverrideSelection() 113 | { 114 | if (SelectionOverride != 0) 115 | { 116 | UnityEditor.Graphs.Node selectedNode = graph[SelectionOverride.ToString()]; 117 | if (selectedNode != null) 118 | { 119 | selection.Clear(); 120 | selection.Add(selectedNode); 121 | CenterGraph(selectedNode.position.position); 122 | 123 | } 124 | SelectionOverride = 0; 125 | } 126 | } 127 | 128 | 129 | 130 | 131 | } 132 | } -------------------------------------------------------------------------------- /Editor/EventsGraphGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0a9d505156c000439f4832d50c68d7f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EventsGraphWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace EventVisualizer.Base 8 | { 9 | public class EventsGraphWindow : EditorWindow 10 | { 11 | [SerializeField] 12 | private EventsGraph _graph; 13 | [SerializeField] 14 | private EventsGraphGUI _graphGUI; 15 | 16 | private const float kZoomMin = 0.1f; 17 | private const float kZoomMax = 1.0f; 18 | 19 | private Rect _zoomArea = new Rect(0.0f, 75.0f, 600.0f, 300.0f - 100.0f); 20 | private float _zoom = 1f; 21 | private Vector2 _zoomCoordsOrigin = Vector2.zero; 22 | 23 | private const float kBarHeight = 17; 24 | 25 | [MenuItem("Window/Events Graph editor")] 26 | static void ShowEditor() 27 | { 28 | EventsGraphWindow editor = EditorWindow.GetWindow(); 29 | editor.hideFlags = HideFlags.HideAndDontSave; 30 | editor.Initialize(); 31 | } 32 | 33 | 34 | private bool initialized = false; 35 | public void Initialize() 36 | { 37 | if (initialized) return; 38 | initialized = true; 39 | _graph = EventsGraph.Create(); 40 | //_graph.RebuildGraph(); 41 | 42 | _graphGUI = _graph.GetEditor(); 43 | _graphGUI.CenterGraph(); 44 | 45 | EditorUtility.SetDirty(_graphGUI); 46 | EditorUtility.SetDirty(_graph); 47 | } 48 | 49 | private static readonly string[] toolbarStrings = new string[] {"Rebuild on selected Hierarchy", "Rebuild JUST selected", "Update connections" }; 50 | 51 | void OnGUI() 52 | { 53 | Initialize(); 54 | 55 | var width = position.width; 56 | var height = position.height; 57 | _zoomArea = new Rect(0, 0, width, height); 58 | HandleEvents(); 59 | 60 | if (_graphGUI != null) 61 | { 62 | Rect r = EditorZoomArea.Begin(_zoom, _zoomArea); 63 | // Main graph area 64 | _graphGUI.BeginGraphGUI(this, r); 65 | _graphGUI.OnGraphGUI(); 66 | _graphGUI.EndGraphGUI(); 67 | 68 | // Clear selection on background click 69 | var e = Event.current; 70 | if (e.type == EventType.MouseDown && e.clickCount == 1) 71 | _graphGUI.ClearSelection(); 72 | 73 | EditorZoomArea.End(); 74 | } 75 | 76 | 77 | // Status bar 78 | GUILayout.BeginArea(new Rect(0, 0, width, kBarHeight+5)); 79 | int result = GUILayout.Toolbar(-1, toolbarStrings); 80 | if(result == 0) RebuildGraphOnSelected(true); 81 | else if (result == 1) RebuildGraphOnSelected(false); 82 | else if(result == 2) RefreshGraphConnections(); 83 | GUILayout.EndArea(); 84 | 85 | const float maxWidth = 200; 86 | GUILayout.BeginArea(new Rect(0, kBarHeight + 5, maxWidth, 20 * 5), GUI.skin.box); 87 | showOnlyWhenSelected.Set(EditorGUILayout.Toggle("Show only when selected", showOnlyWhenSelected.Get(), GUILayout.MaxWidth(maxWidth))); 88 | showLabels.Set(EditorGUILayout.Toggle("Labels", showLabels.Get(), GUILayout.MaxWidth(maxWidth))); 89 | showComponentName.Set(EditorGUILayout.Toggle("Function Full Path", showComponentName.Get(), GUILayout.MaxWidth(maxWidth))); 90 | eventFullName.Set(EditorGUILayout.Toggle("Event Full Name", eventFullName.Get(), GUILayout.MaxWidth(maxWidth))); 91 | showTimesExecuted.Set(EditorGUILayout.Toggle("Times Executed", showTimesExecuted.Get(), GUILayout.MaxWidth(maxWidth))); 92 | GUILayout.EndArea(); 93 | } 94 | 95 | public SavedPrefBool showOnlyWhenSelected = new SavedPrefBool("EventVisualizer_showOnlyWhenSelected", true); 96 | public SavedPrefBool showLabels = new SavedPrefBool("EventVisualizer_showLabels", true); 97 | public SavedPrefBool showComponentName = new SavedPrefBool("EventVisualizer_showComponentName", true); 98 | public SavedPrefBool showTimesExecuted = new SavedPrefBool("EventVisualizer_showTimesExecuted", true); 99 | public SavedPrefBool eventFullName = new SavedPrefBool("EventVisualizer_eventFullName", true); 100 | public float separation = 3; 101 | public GUISkin guiSkin; 102 | 103 | 104 | public class SavedPrefBool { 105 | public readonly string name; 106 | protected readonly bool defaultValue; 107 | protected bool value; 108 | private bool ready = false; 109 | 110 | public SavedPrefBool(string name, bool defaultValue) { 111 | this.name = name; 112 | this.defaultValue = defaultValue; 113 | } 114 | 115 | public bool Get() { 116 | if (!ready) { 117 | ready = true; 118 | value = EditorPrefs.GetBool(name, defaultValue); 119 | } 120 | return value; 121 | } 122 | public void Set(bool value) { 123 | this.value = value; 124 | EditorPrefs.SetBool(name, value); 125 | } 126 | } 127 | 128 | private void Update() 129 | { 130 | if (EdgeTriggersTracker.HasData()) 131 | { 132 | Repaint(); 133 | } 134 | } 135 | 136 | public void OverrideSelection(int overrideIndex) 137 | { 138 | _graphGUI.SelectionOverride = overrideIndex; 139 | } 140 | 141 | public Vector2 ConvertScreenCoordsToZoomCoords(Vector2 screenCoords) 142 | { 143 | return (screenCoords - _zoomArea.TopLeft()) / _zoom + _zoomCoordsOrigin; 144 | } 145 | 146 | 147 | private void HandleEvents() 148 | { 149 | if (Event.current.type == EventType.ScrollWheel) 150 | { 151 | Vector2 screenCoordsMousePos = Event.current.mousePosition; 152 | Vector2 delta = Event.current.delta; 153 | Vector2 zoomCoordsMousePos = ConvertScreenCoordsToZoomCoords(screenCoordsMousePos); 154 | float zoomDelta = -delta.y / 150.0f; 155 | float oldZoom = _zoom; 156 | _zoom += zoomDelta; 157 | _zoom = Mathf.Clamp(_zoom, kZoomMin, kZoomMax); 158 | _zoomCoordsOrigin += (zoomCoordsMousePos - _zoomCoordsOrigin) - (oldZoom / _zoom) * (zoomCoordsMousePos - _zoomCoordsOrigin); 159 | 160 | Event.current.Use(); 161 | } 162 | } 163 | 164 | 165 | public void RebuildGraphOnSelected(bool searchHierarchy) 166 | { 167 | RebuildGraph(Selection.gameObjects, searchHierarchy); 168 | } 169 | 170 | public void RebuildGraph(GameObject[] roots, bool searchHierarchy) 171 | { 172 | if (_graph != null) 173 | { 174 | _graph.RebuildGraph(Selection.gameObjects, searchHierarchy); 175 | } 176 | } 177 | 178 | public void RefreshGraphConnections() 179 | { 180 | Debug.Log("Refreshing UnityEventVisualizer Graph Connections"); 181 | if (_graph != null) 182 | { 183 | _graph.RefreshGraphConnections(); 184 | } 185 | } 186 | 187 | 188 | void OnFocus() { 189 | RemoveCallbacks(); 190 | AddCallbacks(); 191 | } 192 | 193 | void OnDestroy() { 194 | RemoveCallbacks(); 195 | } 196 | 197 | void AddCallbacks() { 198 | SceneView.onSceneGUIDelegate += OnSceneGUI; 199 | EditorApplication.playModeStateChanged += OnPlayModeStateChanged; 200 | } 201 | void RemoveCallbacks() { 202 | SceneView.onSceneGUIDelegate -= OnSceneGUI; 203 | EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; 204 | } 205 | 206 | void OnPlayModeStateChanged(PlayModeStateChange mode) { 207 | switch (mode) { 208 | case PlayModeStateChange.EnteredEditMode: 209 | break; 210 | case PlayModeStateChange.EnteredPlayMode: 211 | RefreshGraphConnections(); 212 | break; 213 | } 214 | } 215 | 216 | private struct Bezier { 217 | public enum Tangent { None, Auto, Positive, Negative, PositiveUnscaled, NegativeUnscaled } 218 | public Vector2 start; 219 | public Vector2 end; 220 | public Tangent startTangent, endTangent; 221 | } 222 | 223 | private struct EventBox { 224 | public EventCall ev; 225 | public GUIContent content; 226 | public Rect rect; 227 | } 228 | 229 | private Dictionary beziersToDraw = new Dictionary(); 230 | private List boxesToDraw = new List(); 231 | void OnSceneGUI(SceneView sceneView) { 232 | Handles.BeginGUI(); 233 | GUI.skin = guiSkin; 234 | 235 | foreach (var elem in NodeData.Nodes) { 236 | GameObject entity = elem.Entity as GameObject; 237 | if (null != entity) { 238 | bool isEntitySelected = CheckSelection(entity.gameObject); 239 | bool behindScreen; 240 | var senderPos2D = WorldToGUIPoint(entity.transform.position, SceneView.currentDrawingSceneView.camera.transform.position, out behindScreen); 241 | 242 | if (isEntitySelected) { 243 | StringBuilder sb = new StringBuilder(); 244 | for (int i = 0; i < elem.Inputs.Count; i++) { 245 | var ev = elem.Inputs[i]; 246 | GameObject receiver = ev.receiver as GameObject; 247 | GameObject sender = ev.sender as GameObject; 248 | 249 | if (null != sender && receiver != ev.sender) { 250 | if (behindScreen) senderPos2D = WorldToGUIPoint(entity.transform.position, sender.transform.position, out behindScreen); 251 | var rect = DrawEventBox(sb, "➜● ", boxesToDraw, ev, ref senderPos2D, behindScreen); 252 | sb.Length = 0; 253 | 254 | Bezier b; 255 | beziersToDraw.TryGetValue(ev, out b); 256 | b.endTangent = Bezier.Tangent.Negative; 257 | b.end = new Vector2(rect.x, rect.y + rect.height * 0.5f); 258 | beziersToDraw[ev] = b; 259 | } 260 | } 261 | for (int i = 0; i < elem.Inputs.Count; i++) { 262 | var ev = elem.Inputs[i]; 263 | GameObject receiver = ev.receiver as GameObject; 264 | if (receiver == ev.sender) { 265 | if (behindScreen) continue; // Don't draw 266 | var rect = DrawEventBox(sb, " ● ", boxesToDraw, ev, ref senderPos2D, behindScreen); 267 | sb.Length = 0; 268 | 269 | Bezier b; 270 | beziersToDraw.TryGetValue(ev, out b); 271 | b.endTangent = Bezier.Tangent.NegativeUnscaled; 272 | b.startTangent = Bezier.Tangent.NegativeUnscaled; 273 | b.start = new Vector2(rect.x, rect.y + rect.height * 0.25f); 274 | b.end = new Vector2(rect.x, rect.y + rect.height * 0.75f); 275 | beziersToDraw[ev] = b; 276 | } 277 | } 278 | for (int i = 0; i < elem.Outputs.Count; i++) { 279 | var ev = elem.Outputs[i]; 280 | GameObject receiver = ev.receiver as GameObject; 281 | if (null != receiver && receiver != ev.sender) { 282 | if (behindScreen) senderPos2D = WorldToGUIPoint(entity.transform.position, receiver.transform.position, out behindScreen); 283 | var rect = DrawEventBox(sb, "●➜ ", boxesToDraw, ev, ref senderPos2D, behindScreen); 284 | sb.Length = 0; 285 | 286 | Bezier b; 287 | beziersToDraw.TryGetValue(ev, out b); 288 | b.startTangent = behindScreen ? Bezier.Tangent.None : Bezier.Tangent.Positive; 289 | b.start = new Vector2(rect.x + rect.width, rect.y + rect.height * 0.5f); 290 | beziersToDraw[ev] = b; 291 | } 292 | } 293 | } 294 | else { 295 | for (int i = 0; i < elem.Inputs.Count; i++) { 296 | var ev = elem.Inputs[i]; 297 | GameObject sender = ev.sender as GameObject; 298 | if (null != sender) { 299 | bool isSenderSelected = CheckSelection(sender.gameObject); 300 | 301 | if (isSenderSelected || ev.lastTimeExecuted + EdgeTriggersTracker.TimeToLive >= EditorApplication.timeSinceStartup) { 302 | if (behindScreen) senderPos2D = WorldToGUIPoint(entity.transform.position, sender.transform.position, out behindScreen); 303 | var localEnd2D = senderPos2D + new Vector2(0, separation * ev.nodeSender.Inputs.IndexOf(ev)); 304 | 305 | Bezier b; 306 | beziersToDraw.TryGetValue(ev, out b); 307 | b.endTangent = behindScreen ? Bezier.Tangent.None : Bezier.Tangent.Auto; 308 | b.end = localEnd2D; 309 | beziersToDraw[ev] = b; 310 | } 311 | } 312 | } 313 | 314 | for (int i = 0; i < elem.Outputs.Count; i++) { 315 | var ev = elem.Outputs[i]; 316 | GameObject receiver = ev.receiver as GameObject; 317 | if (null != receiver) { 318 | bool isReceiverSelected = CheckSelection(receiver.gameObject); 319 | 320 | if (isReceiverSelected || ev.lastTimeExecuted + EdgeTriggersTracker.TimeToLive >= EditorApplication.timeSinceStartup) { 321 | if (behindScreen) senderPos2D = WorldToGUIPoint(entity.transform.position, receiver.transform.position, out behindScreen); 322 | var localStart2D = senderPos2D + new Vector2(0, separation * i); 323 | 324 | Bezier b; 325 | beziersToDraw.TryGetValue(ev, out b); 326 | b.startTangent = Bezier.Tangent.Auto; 327 | b.start = localStart2D; 328 | beziersToDraw[ev] = b; 329 | } 330 | } 331 | } 332 | 333 | } 334 | } 335 | } 336 | 337 | foreach (var elem in beziersToDraw) { 338 | DrawConnection(elem.Key, elem.Value); 339 | } 340 | beziersToDraw.Clear(); 341 | 342 | foreach (var box in boxesToDraw) { 343 | DrawEventBox(box); 344 | } 345 | boxesToDraw.Clear(); 346 | 347 | Handles.EndGUI(); 348 | } 349 | 350 | private bool CheckSelection(GameObject go) { 351 | return !showOnlyWhenSelected.Get() || Selection.Contains(go); 352 | } 353 | 354 | private Rect DrawEventBox(StringBuilder sb, string type, List boxesToDraw, EventCall ev, ref Vector2 boxPos, bool outsideScreen) { 355 | Rect rect = new Rect(boxPos, new Vector2(0, separation)); 356 | 357 | if (!outsideScreen && showLabels.Get()) { 358 | sb.Append(type); 359 | if (showTimesExecuted.Get()) sb.Append("(").Append(ev.timesExecuted).Append(") "); 360 | sb.Append(eventFullName.Get() ? ev.eventFullName : ev.eventShortName).Append(" ▶ "); 361 | if (showComponentName.Get()) sb.Append(ev.ReceiverComponentNameSimple).Append("."); 362 | sb.Append(ev.method); 363 | 364 | GUIContent content = new GUIContent(sb.ToString()); 365 | 366 | rect.size = GUI.skin.box.CalcSize(content); 367 | 368 | boxesToDraw.Add(new EventBox() { 369 | content = content, 370 | ev = ev, 371 | rect = rect 372 | }); 373 | } 374 | 375 | boxPos.y += rect.height; 376 | return rect; 377 | } 378 | 379 | 380 | private static void DrawEventBox(EventBox box) { 381 | var originalContentColor = GUI.contentColor; 382 | var originalBackgroundColor = GUI.backgroundColor; 383 | 384 | GUI.backgroundColor = box.ev.color; 385 | GUI.contentColor = Brightness(box.ev.color) < 0.5f ? Color.white : Color.black; 386 | 387 | if (GUI.Button(box.rect, box.content)) { 388 | Selection.activeObject = box.ev.sender; 389 | } 390 | 391 | GUI.contentColor = originalContentColor; 392 | GUI.backgroundColor = originalBackgroundColor; 393 | } 394 | 395 | private static float Brightness(Color color) { 396 | return 0.2126f * color.r + 0.7152f * color.g + 0.0722f * color.b; 397 | } 398 | 399 | private static void DrawConnection(EventCall ev, Bezier b) { 400 | const float tangentSize = 50; 401 | 402 | float diff = b.end.x - b.start.x; 403 | diff = Mathf.Sign(diff) * Mathf.Min(Mathf.Abs(diff), tangentSize); 404 | 405 | var p1 = b.start; 406 | var p2 = b.end; 407 | var p3 = p1; 408 | var p4 = p2; 409 | 410 | if (b.startTangent == Bezier.Tangent.Auto) p3 += new Vector2(diff, 0); 411 | else if (b.startTangent == Bezier.Tangent.Negative) p3 -= new Vector2(Math.Abs(diff), 0); 412 | else if (b.startTangent == Bezier.Tangent.Positive) p3 += new Vector2(Math.Abs(diff), 0); 413 | else if (b.startTangent == Bezier.Tangent.NegativeUnscaled) p3 -= new Vector2(tangentSize, 0); 414 | else if (b.startTangent == Bezier.Tangent.PositiveUnscaled) p3 += new Vector2(tangentSize, 0); 415 | 416 | if (b.endTangent == Bezier.Tangent.Auto) p4 -= new Vector2(diff, 0); 417 | else if (b.endTangent == Bezier.Tangent.Negative) p4 -= new Vector2(Math.Abs(diff), 0); 418 | else if (b.endTangent == Bezier.Tangent.Positive) p4 += new Vector2(Math.Abs(diff), 0); 419 | else if (b.endTangent == Bezier.Tangent.NegativeUnscaled) p4 -= new Vector2(tangentSize, 0); 420 | else if (b.endTangent == Bezier.Tangent.PositiveUnscaled) p4 += new Vector2(tangentSize, 0); 421 | 422 | Color c = ev.color; 423 | Color prevColor = Handles.color; 424 | Handles.color = c; 425 | Handles.DrawBezier(p1, p2, p3, p4, c, (Texture2D) UnityEditor.Graphs.Styles.selectedConnectionTexture.image, EdgeGUI.kEdgeWidth); 426 | foreach (var trigger in EdgeTriggersTracker.GetTimings(ev)) { 427 | Vector3 pos = EdgeGUI.CalculateBezierPoint(trigger, p1, p3, p4, p2); 428 | Handles.DrawSolidArc(pos, Vector3.back, pos + Vector3.up, 360, EdgeGUI.kEdgeWidth); 429 | } 430 | Handles.color = prevColor; 431 | } 432 | 433 | /// if p is behind the screen, p2 is used to trace a line to p and raycast it to the near clipping camera of the scene camera 434 | private static Vector2 WorldToGUIPoint(Vector3 p, Vector3 p2, out bool behindScreen) { 435 | Camera cam = SceneView.currentDrawingSceneView.camera; 436 | Vector3 viewPos = cam.WorldToViewportPoint(p); 437 | behindScreen = viewPos.z < 0; 438 | 439 | if (behindScreen && cam.WorldToViewportPoint(p2).z < 0) return Vector2.zero; 440 | 441 | if (behindScreen) { 442 | if (p2 == cam.transform.position) return Vector2.zero; 443 | 444 | var Plane = new Plane(cam.transform.forward, cam.transform.position + cam.transform.forward * cam.nearClipPlane); 445 | Ray r = new Ray(p, p2 - p); 446 | float enter; 447 | 448 | if (!Plane.Raycast(r, out enter)) return Vector2.zero; 449 | 450 | Vector3 proj = r.origin + r.direction * enter; 451 | 452 | viewPos = cam.WorldToViewportPoint(proj); 453 | } 454 | float scaleFactor = 1f; 455 | return new Vector2( 456 | viewPos.x * cam.scaledPixelWidth, 457 | (1 - viewPos.y) * cam.scaledPixelHeight) * scaleFactor; 458 | } 459 | } 460 | } -------------------------------------------------------------------------------- /Editor/EventsGraphWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29ac7234bb09f2f4d8dafebd9faacc56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - m_PersistentViewDataDictionary: {instanceID: 0} 8 | - _graph: {instanceID: 0} 9 | - _graphGUI: {instanceID: 0} 10 | - guiSkin: {fileID: 11400000, guid: a50898c5657da2f41ba2982386c0f576, type: 2} 11 | executionOrder: 0 12 | icon: {instanceID: 0} 13 | userData: 14 | assetBundleName: 15 | assetBundleVariant: 16 | -------------------------------------------------------------------------------- /Editor/EventsVisualizer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEditor; 4 | using UnityEngine.EventSystems; 5 | using System.Reflection; 6 | using UnityEngine.Events; 7 | using System; 8 | using UnityEditor.Callbacks; 9 | using System.Linq; 10 | 11 | namespace EventVisualizer.Base 12 | { 13 | public static class EventsFinder 14 | { 15 | public static List FindAllEvents(GameObject[] roots, bool searchHierarchy = true) 16 | { 17 | HashSet calls = new HashSet(); 18 | foreach (var type in ComponentsThatCanHaveUnityEvent) 19 | { 20 | if(type.IsGenericTypeDefinition) 21 | { 22 | continue; 23 | } 24 | 25 | HashSet selectedComponents = new HashSet(); 26 | if(roots != null && roots.Length > 0) 27 | { 28 | foreach(var root in roots) 29 | { 30 | if(root != null) 31 | { 32 | if(searchHierarchy) 33 | { 34 | selectedComponents.UnionWith(root.GetComponentsInChildren(type)); 35 | } 36 | else 37 | { 38 | selectedComponents.Add(root.GetComponent(type)); 39 | } 40 | } 41 | } 42 | } 43 | else 44 | { 45 | selectedComponents = new HashSet(GameObject.FindObjectsOfType(type)); 46 | } 47 | 48 | foreach (UnityEngine.Object caller in selectedComponents) 49 | { 50 | Component comp = caller as Component; 51 | if(comp != null) 52 | { 53 | ExtractDefaultEventTriggers(calls, comp); 54 | ExtractEvents(calls, comp); 55 | } 56 | } 57 | } 58 | return calls.ToList(); 59 | } 60 | 61 | private static void ExtractEvents(HashSet calls, Component caller) 62 | { 63 | SerializedProperty iterator = new SerializedObject(caller).GetIterator(); 64 | iterator.Next(true); 65 | RecursivelyExtractEvents(calls, caller, iterator, 0); 66 | } 67 | 68 | private static bool RecursivelyExtractEvents(HashSet calls, Component caller, SerializedProperty iterator, int level) { 69 | bool hasData = true; 70 | 71 | do { 72 | SerializedProperty persistentCalls = iterator.FindPropertyRelative("m_PersistentCalls.m_Calls"); 73 | bool isUnityEvent = persistentCalls != null; 74 | if (isUnityEvent && persistentCalls.arraySize > 0) { 75 | UnityEventBase unityEvent = Puppy.EditorHelper.GetTargetObjectOfProperty(iterator) as UnityEventBase; 76 | AddEventCalls(calls, caller, unityEvent, iterator.displayName, iterator.propertyPath); 77 | } 78 | hasData = iterator.Next(!isUnityEvent); 79 | if (hasData) { 80 | if (iterator.depth < level) return hasData; 81 | else if (iterator.depth > level) hasData = RecursivelyExtractEvents(calls, caller, iterator, iterator.depth); 82 | } 83 | } 84 | while (hasData); 85 | return false; 86 | } 87 | 88 | private static void ExtractDefaultEventTriggers(HashSet calls, Component caller) 89 | { 90 | EventTrigger eventTrigger = caller as EventTrigger; 91 | if (eventTrigger != null) 92 | { 93 | foreach (EventTrigger.Entry trigger in eventTrigger.triggers) 94 | { 95 | string name = trigger.eventID.ToString(); 96 | AddEventCalls(calls, caller, trigger.callback, name, name); 97 | } 98 | } 99 | } 100 | 101 | private static void AddEventCalls(HashSet calls, Component caller, UnityEventBase unityEvent, string eventShortName, string eventFullName) { 102 | for (int i = 0; i < unityEvent.GetPersistentEventCount(); i++) { 103 | string methodName = unityEvent.GetPersistentMethodName(i); 104 | UnityEngine.Object receiver = unityEvent.GetPersistentTarget(i); 105 | 106 | if (receiver != null && methodName != null && methodName != "") { 107 | calls.Add(new EventCall(caller, receiver, eventShortName, eventFullName, methodName, unityEvent)); 108 | } 109 | } 110 | } 111 | 112 | public static bool NeedsGraphRefresh = false; 113 | 114 | private static HashSet ComponentsThatCanHaveUnityEvent = new HashSet(); 115 | private static Dictionary TmpSearchedTypes = new Dictionary(); 116 | 117 | [DidReloadScripts, InitializeOnLoadMethod] 118 | static void RefreshTypesThatCanHoldUnityEvents() { 119 | var sw = System.Diagnostics.Stopwatch.StartNew(); 120 | 121 | #if NET_4_6 122 | var objects = AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic) 123 | .SelectMany(a => a.GetTypes()) 124 | .Where(t => typeof(Component).IsAssignableFrom(t)); 125 | #else 126 | var objects = AppDomain.CurrentDomain.GetAssemblies() 127 | .SelectMany(a => a.GetTypes()) 128 | .Where(t => typeof(Component).IsAssignableFrom(t)); 129 | #endif 130 | 131 | foreach (var obj in objects) { 132 | if (RecursivelySearchFields(obj)) { 133 | ComponentsThatCanHaveUnityEvent.Add(obj); 134 | } 135 | } 136 | TmpSearchedTypes.Clear(); 137 | 138 | Debug.Log("UnityEventVisualizer Updated Components that can have UnityEvents (" + ComponentsThatCanHaveUnityEvent.Count + "). Milliseconds: " + sw.Elapsed.TotalMilliseconds); 139 | } 140 | 141 | /// 142 | /// Search for types that have a field or property of type or can hold an object that can. 143 | /// 144 | /// Needle 145 | /// Haystack 146 | /// Can contain some object 147 | static bool RecursivelySearchFields(Type type) { 148 | bool wanted; 149 | if (TmpSearchedTypes.TryGetValue(type, out wanted)) return wanted; 150 | TmpSearchedTypes.Add(type, false); 151 | 152 | const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; 153 | foreach (var fType in type.GetFields(flags).Where(f => !f.FieldType.IsPrimitive).Select(f => f.FieldType).Concat(type.GetProperties(flags).Select(p => p.PropertyType))) { 154 | if (typeof(T).IsAssignableFrom(fType)) { 155 | return TmpSearchedTypes[type] |= true; 156 | } 157 | else if (typeof(UnityEngine.Object).IsAssignableFrom(fType)) { 158 | continue; 159 | } 160 | else if (!TmpSearchedTypes.TryGetValue(fType, out wanted)) { 161 | if (RecursivelySearchFields(fType)) { 162 | return TmpSearchedTypes[type] |= true; 163 | } 164 | } 165 | else if (wanted) { 166 | return TmpSearchedTypes[type] |= true; 167 | } 168 | } 169 | 170 | if (type.IsArray) { 171 | if (RecursivelySearchFields(type.GetElementType())) { 172 | return TmpSearchedTypes[type] |= true; 173 | } 174 | } 175 | 176 | return false; 177 | } 178 | } 179 | } -------------------------------------------------------------------------------- /Editor/EventsVisualizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f765f9e5d63c890448d227f118754401 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/FindInGraphButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace EventVisualizer.Base 5 | { 6 | public static class FindInGraphButton 7 | { 8 | [MenuItem("GameObject/EventGraph/Find in current graph", false, 0)] 9 | static void FindEvents() 10 | { 11 | EventsGraphWindow window = EditorWindow.GetWindow(); 12 | if(window != null) 13 | { 14 | window.OverrideSelection(Selection.activeInstanceID); 15 | } 16 | } 17 | 18 | [MenuItem("GameObject/EventGraph/Graph just this", false, 0)] 19 | static void GraphSelection() 20 | { 21 | EventsGraphWindow window = EditorWindow.GetWindow(); 22 | window.RebuildGraph(new GameObject[] { Selection.activeGameObject }, false); 23 | } 24 | [MenuItem("GameObject/EventGraph/Graph this hierarchy", false, 0)] 25 | static void GraphSelectionHierarchy() 26 | { 27 | EventsGraphWindow window = EditorWindow.GetWindow(); 28 | window.RebuildGraph(new GameObject[] { Selection.activeGameObject }, true); 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Editor/FindInGraphButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82c731ab640f84c418a051295fc47a71 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/NodeData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace EventVisualizer.Base 5 | { 6 | [System.Serializable] 7 | public class NodeData 8 | { 9 | public Object Entity { get; private set; } 10 | 11 | public string Name 12 | { 13 | get 14 | { 15 | return Entity != null ? Entity.name : ""; 16 | } 17 | } 18 | 19 | public List Outputs { get; private set; } 20 | public List Inputs { get; private set; } 21 | 22 | [SerializeField] 23 | private static Dictionary nodes = new Dictionary(); 24 | 25 | public static ICollection Nodes 26 | { 27 | get 28 | { 29 | return nodes != null ? nodes.Values : null; 30 | } 31 | } 32 | 33 | 34 | 35 | public static void ClearAll() 36 | { 37 | nodes.Clear(); 38 | } 39 | 40 | public static void ClearSlots() 41 | { 42 | foreach(var node in nodes.Keys) 43 | { 44 | nodes[node].Outputs.Clear(); 45 | nodes[node].Inputs.Clear(); 46 | } 47 | } 48 | 49 | public static void RegisterEvent(EventCall eventCall) 50 | { 51 | var nodeSender = CreateNode(eventCall.sender); 52 | var nodeReceiver = CreateNode(eventCall.receiver); 53 | 54 | eventCall.nodeSender = nodeSender; 55 | eventCall.nodeReceiver = nodeReceiver; 56 | 57 | nodeSender.Outputs.Add(eventCall); 58 | nodeReceiver.Inputs.Add(eventCall); 59 | } 60 | 61 | 62 | 63 | private static NodeData CreateNode(Object entity) 64 | { 65 | int id = entity.GetInstanceID(); 66 | 67 | NodeData nodeData; 68 | if (!nodes.TryGetValue(id, out nodeData)) 69 | { 70 | nodes.Add(id, nodeData = new NodeData(entity)); 71 | } 72 | return nodeData; 73 | } 74 | 75 | public NodeData(Object entity) 76 | { 77 | Entity = entity; 78 | Outputs = new List(); 79 | Inputs = new List(); 80 | } 81 | } 82 | 83 | } -------------------------------------------------------------------------------- /Editor/NodeData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e15846c0f71123d4e8406b6a6a30b732 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/NodeGUI.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Linq; 4 | using UnityEditor.Graphs; 5 | using System.Collections.Generic; 6 | 7 | namespace EventVisualizer.Base 8 | { 9 | public class NodeGUI : UnityEditor.Graphs.Node 10 | { 11 | #region Public class methods 12 | 13 | // Factory method 14 | static public NodeGUI Create(NodeData dataInstance) 15 | { 16 | bool isGameObject = dataInstance.Entity is GameObject; 17 | 18 | var node = CreateInstance(); 19 | node.Initialize(dataInstance); 20 | node.name = dataInstance.Entity.GetInstanceID().ToString(); 21 | node.icon = (Texture2D)EditorGUIUtility.IconContent(isGameObject?"Gameobject Icon" : "ScriptableObject Icon").image; 22 | return node; 23 | } 24 | 25 | #endregion 26 | 27 | #region Public member properties and methods 28 | 29 | private Texture2D icon; 30 | 31 | public bool isValid 32 | { 33 | get { return _runtimeInstance != null; } 34 | } 35 | 36 | #endregion 37 | 38 | #region Overridden virtual methods 39 | 40 | public override string title 41 | { 42 | get { return isValid ? _runtimeInstance.Name : ""; } 43 | } 44 | 45 | 46 | public override void NodeUI(GraphGUI host) 47 | { 48 | base.NodeUI(host); 49 | if (icon != null) 50 | { 51 | GUI.DrawTexture(new Rect(Vector2.one * 5, new Vector2(20, 20)), icon); 52 | } 53 | } 54 | 55 | #endregion 56 | 57 | #region Private members 58 | 59 | NodeData _runtimeInstance; 60 | 61 | void Initialize(NodeData runtimeInstance) 62 | { 63 | hideFlags = HideFlags.DontSave; 64 | 65 | _runtimeInstance = runtimeInstance; 66 | position = new Rect(Vector2.one * UnityEngine.Random.Range(0, 500), Vector2.zero); 67 | 68 | PopulateSlots(); 69 | } 70 | 71 | 72 | void PopulateSlots() 73 | { 74 | foreach (EventCall call in _runtimeInstance.Outputs) 75 | { 76 | string name = call.eventShortName; 77 | string title = ObjectNames.NicifyVariableName(name); 78 | if (!outputSlots.Any(s => s.title == title)) 79 | { 80 | var slot = AddOutputSlot(name); 81 | slot.title = title; 82 | } 83 | } 84 | 85 | foreach (EventCall call in _runtimeInstance.Inputs) 86 | { 87 | string name = call.MethodFullPath; 88 | string title = ObjectNames.NicifyVariableName(name); 89 | if (!inputSlots.Any(s => s.title == title)) 90 | { 91 | var slot = AddInputSlot(name); 92 | slot.title = title; 93 | } 94 | } 95 | } 96 | 97 | public void PopulateEdges() 98 | { 99 | foreach (var outSlot in outputSlots) 100 | { 101 | List outCalls = _runtimeInstance.Outputs.FindAll(call => call.eventShortName == outSlot.name); 102 | 103 | foreach (EventCall call in outCalls) 104 | { 105 | var targetNode = graph[call.receiver.GetInstanceID().ToString()]; 106 | var inSlot = targetNode[call.MethodFullPath]; 107 | 108 | if (graph.Connected(outSlot, inSlot)) 109 | { 110 | Edge existingEdge = graph.edges.Find(e => e.fromSlot == outSlot && e.toSlot == inSlot); 111 | graph.RemoveEdge(existingEdge); 112 | } 113 | 114 | Edge edge = graph.Connect(outSlot, inSlot); 115 | call.OnTriggered += (() => EdgeTriggersTracker.RegisterTrigger(edge, call)); 116 | } 117 | } 118 | } 119 | 120 | #endregion 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Editor/NodeGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 387c6d86b11d7d241a2da4a68b1dd9a5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/PuppyEditor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5eb07465e2dcc2b4f9912d982a73e472 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/PuppyEditor/EditorHelper.cs: -------------------------------------------------------------------------------- 1 | //https://github.com/lordofduct/spacepuppy-unity-framework/blob/master/SpacepuppyBaseEditor/EditorHelper.cs 2 | // Removed some functions from the original file that aren't needed here 3 | 4 | using UnityEngine; 5 | using UnityEditor; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Reflection; 9 | 10 | namespace EventVisualizer.Puppy 11 | { 12 | public static class EditorHelper 13 | { 14 | 15 | #region SerializedProperty Helpers 16 | 17 | public static object GetTargetObjectOfProperty(SerializedProperty prop) 18 | { 19 | 20 | var path = prop.propertyPath.Replace(".Array.data[", "["); 21 | object obj = prop.serializedObject.targetObject; 22 | var elements = path.Split('.'); 23 | foreach (var element in elements) 24 | { 25 | if (element.Contains("[")) 26 | { 27 | var elementName = element.Substring(0, element.IndexOf("[")); 28 | var index = System.Convert.ToInt32(element.Substring(element.IndexOf("[")).Replace("[", "").Replace("]", "")); 29 | obj = GetValue_Imp(obj, elementName, index); 30 | } 31 | else 32 | { 33 | obj = GetValue_Imp(obj, element); 34 | } 35 | } 36 | return obj; 37 | } 38 | 39 | public static object GetTargetObjectWithProperty(SerializedProperty prop) 40 | { 41 | var path = prop.propertyPath.Replace(".Array.data[", "["); 42 | object obj = prop.serializedObject.targetObject; 43 | var elements = path.Split('.'); 44 | foreach (var element in elements.Take(elements.Length - 1)) 45 | { 46 | if (element.Contains("[")) 47 | { 48 | var elementName = element.Substring(0, element.IndexOf("[")); 49 | var index = System.Convert.ToInt32(element.Substring(element.IndexOf("[")).Replace("[", "").Replace("]", "")); 50 | obj = GetValue_Imp(obj, elementName, index); 51 | } 52 | else 53 | { 54 | obj = GetValue_Imp(obj, element); 55 | } 56 | } 57 | return obj; 58 | } 59 | 60 | private static object GetValue_Imp(object source, string name) 61 | { 62 | if (source == null) 63 | return null; 64 | var type = source.GetType(); 65 | 66 | while (type != null) 67 | { 68 | var f = type.GetField(name, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 69 | if (f != null) 70 | return f.GetValue(source); 71 | 72 | var p = type.GetProperty(name, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase); 73 | if (p != null) 74 | return p.GetValue(source, null); 75 | 76 | type = type.BaseType; 77 | } 78 | return null; 79 | } 80 | 81 | private static object GetValue_Imp(object source, string name, int index) 82 | { 83 | var enumerable = GetValue_Imp(source, name) as System.Collections.IEnumerable; 84 | if (enumerable == null) return null; 85 | var enm = enumerable.GetEnumerator(); 86 | 87 | for (int i = 0; i <= index; i++) 88 | { 89 | if (!enm.MoveNext()) return null; 90 | } 91 | return enm.Current; 92 | } 93 | 94 | #endregion 95 | 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /Editor/PuppyEditor/EditorHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df6a2a6945f2bdd459f360036853fb7f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/RectExtensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace EventVisualizer.Base 4 | { 5 | 6 | public static class RectExtensions 7 | { 8 | public static Vector2 TopLeft(this Rect rect) 9 | { 10 | return new Vector2(rect.xMin, rect.yMin); 11 | } 12 | public static Rect ScaleSizeBy(this Rect rect, float scale) 13 | { 14 | return rect.ScaleSizeBy(scale, rect.center); 15 | } 16 | public static Rect ScaleSizeBy(this Rect rect, float scale, Vector2 pivotPoint) 17 | { 18 | Rect result = rect; 19 | result.x -= pivotPoint.x; 20 | result.y -= pivotPoint.y; 21 | result.xMin *= scale; 22 | result.xMax *= scale; 23 | result.yMin *= scale; 24 | result.yMax *= scale; 25 | result.x += pivotPoint.x; 26 | result.y += pivotPoint.y; 27 | return result; 28 | } 29 | public static Rect ScaleSizeBy(this Rect rect, Vector2 scale) 30 | { 31 | return rect.ScaleSizeBy(scale, rect.center); 32 | } 33 | public static Rect ScaleSizeBy(this Rect rect, Vector2 scale, Vector2 pivotPoint) 34 | { 35 | Rect result = rect; 36 | result.x -= pivotPoint.x; 37 | result.y -= pivotPoint.y; 38 | result.xMin *= scale.x; 39 | result.xMax *= scale.x; 40 | result.yMin *= scale.y; 41 | result.yMax *= scale.y; 42 | result.x += pivotPoint.x; 43 | result.y += pivotPoint.y; 44 | return result; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Editor/RectExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a58e766eeacbb249a6930fa9cef2619 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/gui scene skin.guiskin: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 1 12 | m_Script: {fileID: 12001, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: gui scene skin 14 | m_EditorClassIdentifier: 15 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 16 | m_box: 17 | m_Name: box 18 | m_Normal: 19 | m_Background: {fileID: 2800000, guid: 09fd97bbd9533304aacddbf7ffbc11f9, type: 3} 20 | m_ScaledBackgrounds: [] 21 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 22 | m_Hover: 23 | m_Background: {fileID: 0} 24 | m_ScaledBackgrounds: [] 25 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 26 | m_Active: 27 | m_Background: {fileID: 0} 28 | m_ScaledBackgrounds: [] 29 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 30 | m_Focused: 31 | m_Background: {fileID: 0} 32 | m_ScaledBackgrounds: [] 33 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 34 | m_OnNormal: 35 | m_Background: {fileID: 0} 36 | m_ScaledBackgrounds: [] 37 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 38 | m_OnHover: 39 | m_Background: {fileID: 0} 40 | m_ScaledBackgrounds: [] 41 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_OnActive: 43 | m_Background: {fileID: 0} 44 | m_ScaledBackgrounds: [] 45 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 46 | m_OnFocused: 47 | m_Background: {fileID: 0} 48 | m_ScaledBackgrounds: [] 49 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 50 | m_Border: 51 | m_Left: 1 52 | m_Right: 1 53 | m_Top: 1 54 | m_Bottom: 1 55 | m_Margin: 56 | m_Left: 0 57 | m_Right: 0 58 | m_Top: 0 59 | m_Bottom: 0 60 | m_Padding: 61 | m_Left: 5 62 | m_Right: 5 63 | m_Top: 2 64 | m_Bottom: 2 65 | m_Overflow: 66 | m_Left: 0 67 | m_Right: 0 68 | m_Top: 0 69 | m_Bottom: 0 70 | m_Font: {fileID: 0} 71 | m_FontSize: 10 72 | m_FontStyle: 0 73 | m_Alignment: 0 74 | m_WordWrap: 0 75 | m_RichText: 0 76 | m_TextClipping: 1 77 | m_ImagePosition: 0 78 | m_ContentOffset: {x: 0, y: 0} 79 | m_FixedWidth: 0 80 | m_FixedHeight: 0 81 | m_StretchWidth: 0 82 | m_StretchHeight: 0 83 | m_button: 84 | m_Name: button 85 | m_Normal: 86 | m_Background: {fileID: 2800000, guid: 09fd97bbd9533304aacddbf7ffbc11f9, type: 3} 87 | m_ScaledBackgrounds: [] 88 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 89 | m_Hover: 90 | m_Background: {fileID: 0} 91 | m_ScaledBackgrounds: [] 92 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 93 | m_Active: 94 | m_Background: {fileID: 0} 95 | m_ScaledBackgrounds: [] 96 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 97 | m_Focused: 98 | m_Background: {fileID: 0} 99 | m_ScaledBackgrounds: [] 100 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 101 | m_OnNormal: 102 | m_Background: {fileID: 0} 103 | m_ScaledBackgrounds: [] 104 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 105 | m_OnHover: 106 | m_Background: {fileID: 0} 107 | m_ScaledBackgrounds: [] 108 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 109 | m_OnActive: 110 | m_Background: {fileID: 0} 111 | m_ScaledBackgrounds: [] 112 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 113 | m_OnFocused: 114 | m_Background: {fileID: 0} 115 | m_ScaledBackgrounds: [] 116 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 117 | m_Border: 118 | m_Left: 1 119 | m_Right: 1 120 | m_Top: 1 121 | m_Bottom: 1 122 | m_Margin: 123 | m_Left: 0 124 | m_Right: 0 125 | m_Top: 0 126 | m_Bottom: 0 127 | m_Padding: 128 | m_Left: 5 129 | m_Right: 5 130 | m_Top: 2 131 | m_Bottom: 2 132 | m_Overflow: 133 | m_Left: 0 134 | m_Right: 0 135 | m_Top: 0 136 | m_Bottom: 0 137 | m_Font: {fileID: 0} 138 | m_FontSize: 10 139 | m_FontStyle: 0 140 | m_Alignment: 0 141 | m_WordWrap: 0 142 | m_RichText: 0 143 | m_TextClipping: 1 144 | m_ImagePosition: 0 145 | m_ContentOffset: {x: 0, y: 0} 146 | m_FixedWidth: 0 147 | m_FixedHeight: 0 148 | m_StretchWidth: 0 149 | m_StretchHeight: 0 150 | m_toggle: 151 | m_Name: toggle 152 | m_Normal: 153 | m_Background: {fileID: 11018, guid: 0000000000000000e000000000000000, type: 0} 154 | m_ScaledBackgrounds: [] 155 | m_TextColor: {r: 0.89112896, g: 0.89112896, b: 0.89112896, a: 1} 156 | m_Hover: 157 | m_Background: {fileID: 11014, guid: 0000000000000000e000000000000000, type: 0} 158 | m_ScaledBackgrounds: [] 159 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 160 | m_Active: 161 | m_Background: {fileID: 11013, guid: 0000000000000000e000000000000000, type: 0} 162 | m_ScaledBackgrounds: [] 163 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 164 | m_Focused: 165 | m_Background: {fileID: 0} 166 | m_ScaledBackgrounds: [] 167 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 168 | m_OnNormal: 169 | m_Background: {fileID: 11016, guid: 0000000000000000e000000000000000, type: 0} 170 | m_ScaledBackgrounds: [] 171 | m_TextColor: {r: 0.8901961, g: 0.8901961, b: 0.8901961, a: 1} 172 | m_OnHover: 173 | m_Background: {fileID: 11015, guid: 0000000000000000e000000000000000, type: 0} 174 | m_ScaledBackgrounds: [] 175 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 176 | m_OnActive: 177 | m_Background: {fileID: 11017, guid: 0000000000000000e000000000000000, type: 0} 178 | m_ScaledBackgrounds: [] 179 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 180 | m_OnFocused: 181 | m_Background: {fileID: 0} 182 | m_ScaledBackgrounds: [] 183 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 184 | m_Border: 185 | m_Left: 14 186 | m_Right: 0 187 | m_Top: 14 188 | m_Bottom: 0 189 | m_Margin: 190 | m_Left: 4 191 | m_Right: 4 192 | m_Top: 4 193 | m_Bottom: 4 194 | m_Padding: 195 | m_Left: 15 196 | m_Right: 0 197 | m_Top: 3 198 | m_Bottom: 0 199 | m_Overflow: 200 | m_Left: -1 201 | m_Right: 0 202 | m_Top: -4 203 | m_Bottom: 0 204 | m_Font: {fileID: 0} 205 | m_FontSize: 0 206 | m_FontStyle: 0 207 | m_Alignment: 0 208 | m_WordWrap: 0 209 | m_RichText: 1 210 | m_TextClipping: 1 211 | m_ImagePosition: 0 212 | m_ContentOffset: {x: 0, y: 0} 213 | m_FixedWidth: 0 214 | m_FixedHeight: 0 215 | m_StretchWidth: 1 216 | m_StretchHeight: 0 217 | m_label: 218 | m_Name: label 219 | m_Normal: 220 | m_Background: {fileID: 0} 221 | m_ScaledBackgrounds: [] 222 | m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} 223 | m_Hover: 224 | m_Background: {fileID: 0} 225 | m_ScaledBackgrounds: [] 226 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 227 | m_Active: 228 | m_Background: {fileID: 0} 229 | m_ScaledBackgrounds: [] 230 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 231 | m_Focused: 232 | m_Background: {fileID: 0} 233 | m_ScaledBackgrounds: [] 234 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 235 | m_OnNormal: 236 | m_Background: {fileID: 0} 237 | m_ScaledBackgrounds: [] 238 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 239 | m_OnHover: 240 | m_Background: {fileID: 0} 241 | m_ScaledBackgrounds: [] 242 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 243 | m_OnActive: 244 | m_Background: {fileID: 0} 245 | m_ScaledBackgrounds: [] 246 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 247 | m_OnFocused: 248 | m_Background: {fileID: 0} 249 | m_ScaledBackgrounds: [] 250 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 251 | m_Border: 252 | m_Left: 0 253 | m_Right: 0 254 | m_Top: 0 255 | m_Bottom: 0 256 | m_Margin: 257 | m_Left: 4 258 | m_Right: 4 259 | m_Top: 4 260 | m_Bottom: 4 261 | m_Padding: 262 | m_Left: 0 263 | m_Right: 0 264 | m_Top: 3 265 | m_Bottom: 3 266 | m_Overflow: 267 | m_Left: 0 268 | m_Right: 0 269 | m_Top: 0 270 | m_Bottom: 0 271 | m_Font: {fileID: 0} 272 | m_FontSize: 0 273 | m_FontStyle: 0 274 | m_Alignment: 0 275 | m_WordWrap: 1 276 | m_RichText: 1 277 | m_TextClipping: 1 278 | m_ImagePosition: 0 279 | m_ContentOffset: {x: 0, y: 0} 280 | m_FixedWidth: 0 281 | m_FixedHeight: 0 282 | m_StretchWidth: 1 283 | m_StretchHeight: 0 284 | m_textField: 285 | m_Name: textfield 286 | m_Normal: 287 | m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0} 288 | m_ScaledBackgrounds: [] 289 | m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} 290 | m_Hover: 291 | m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} 292 | m_ScaledBackgrounds: [] 293 | m_TextColor: {r: 0.9, g: 0.9, b: 0.9, a: 1} 294 | m_Active: 295 | m_Background: {fileID: 0} 296 | m_ScaledBackgrounds: [] 297 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 298 | m_Focused: 299 | m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} 300 | m_ScaledBackgrounds: [] 301 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 302 | m_OnNormal: 303 | m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} 304 | m_ScaledBackgrounds: [] 305 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 306 | m_OnHover: 307 | m_Background: {fileID: 0} 308 | m_ScaledBackgrounds: [] 309 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 310 | m_OnActive: 311 | m_Background: {fileID: 0} 312 | m_ScaledBackgrounds: [] 313 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 314 | m_OnFocused: 315 | m_Background: {fileID: 0} 316 | m_ScaledBackgrounds: [] 317 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 318 | m_Border: 319 | m_Left: 4 320 | m_Right: 4 321 | m_Top: 4 322 | m_Bottom: 4 323 | m_Margin: 324 | m_Left: 4 325 | m_Right: 4 326 | m_Top: 4 327 | m_Bottom: 4 328 | m_Padding: 329 | m_Left: 3 330 | m_Right: 3 331 | m_Top: 3 332 | m_Bottom: 3 333 | m_Overflow: 334 | m_Left: 0 335 | m_Right: 0 336 | m_Top: 0 337 | m_Bottom: 0 338 | m_Font: {fileID: 0} 339 | m_FontSize: 0 340 | m_FontStyle: 0 341 | m_Alignment: 0 342 | m_WordWrap: 0 343 | m_RichText: 0 344 | m_TextClipping: 1 345 | m_ImagePosition: 3 346 | m_ContentOffset: {x: 0, y: 0} 347 | m_FixedWidth: 0 348 | m_FixedHeight: 0 349 | m_StretchWidth: 1 350 | m_StretchHeight: 0 351 | m_textArea: 352 | m_Name: textarea 353 | m_Normal: 354 | m_Background: {fileID: 11024, guid: 0000000000000000e000000000000000, type: 0} 355 | m_ScaledBackgrounds: [] 356 | m_TextColor: {r: 0.9019608, g: 0.9019608, b: 0.9019608, a: 1} 357 | m_Hover: 358 | m_Background: {fileID: 11026, guid: 0000000000000000e000000000000000, type: 0} 359 | m_ScaledBackgrounds: [] 360 | m_TextColor: {r: 0.79999995, g: 0.79999995, b: 0.79999995, a: 1} 361 | m_Active: 362 | m_Background: {fileID: 0} 363 | m_ScaledBackgrounds: [] 364 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 365 | m_Focused: 366 | m_Background: {fileID: 0} 367 | m_ScaledBackgrounds: [] 368 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 369 | m_OnNormal: 370 | m_Background: {fileID: 11025, guid: 0000000000000000e000000000000000, type: 0} 371 | m_ScaledBackgrounds: [] 372 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 373 | m_OnHover: 374 | m_Background: {fileID: 0} 375 | m_ScaledBackgrounds: [] 376 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 377 | m_OnActive: 378 | m_Background: {fileID: 0} 379 | m_ScaledBackgrounds: [] 380 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 381 | m_OnFocused: 382 | m_Background: {fileID: 0} 383 | m_ScaledBackgrounds: [] 384 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 385 | m_Border: 386 | m_Left: 4 387 | m_Right: 4 388 | m_Top: 4 389 | m_Bottom: 4 390 | m_Margin: 391 | m_Left: 4 392 | m_Right: 4 393 | m_Top: 4 394 | m_Bottom: 4 395 | m_Padding: 396 | m_Left: 3 397 | m_Right: 3 398 | m_Top: 3 399 | m_Bottom: 3 400 | m_Overflow: 401 | m_Left: 0 402 | m_Right: 0 403 | m_Top: 0 404 | m_Bottom: 0 405 | m_Font: {fileID: 0} 406 | m_FontSize: 0 407 | m_FontStyle: 0 408 | m_Alignment: 0 409 | m_WordWrap: 1 410 | m_RichText: 0 411 | m_TextClipping: 1 412 | m_ImagePosition: 0 413 | m_ContentOffset: {x: 0, y: 0} 414 | m_FixedWidth: 0 415 | m_FixedHeight: 0 416 | m_StretchWidth: 1 417 | m_StretchHeight: 0 418 | m_window: 419 | m_Name: window 420 | m_Normal: 421 | m_Background: {fileID: 11023, guid: 0000000000000000e000000000000000, type: 0} 422 | m_ScaledBackgrounds: [] 423 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 424 | m_Hover: 425 | m_Background: {fileID: 0} 426 | m_ScaledBackgrounds: [] 427 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 428 | m_Active: 429 | m_Background: {fileID: 0} 430 | m_ScaledBackgrounds: [] 431 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 432 | m_Focused: 433 | m_Background: {fileID: 0} 434 | m_ScaledBackgrounds: [] 435 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 436 | m_OnNormal: 437 | m_Background: {fileID: 11022, guid: 0000000000000000e000000000000000, type: 0} 438 | m_ScaledBackgrounds: [] 439 | m_TextColor: {r: 1, g: 1, b: 1, a: 1} 440 | m_OnHover: 441 | m_Background: {fileID: 0} 442 | m_ScaledBackgrounds: [] 443 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 444 | m_OnActive: 445 | m_Background: {fileID: 0} 446 | m_ScaledBackgrounds: [] 447 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 448 | m_OnFocused: 449 | m_Background: {fileID: 0} 450 | m_ScaledBackgrounds: [] 451 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 452 | m_Border: 453 | m_Left: 8 454 | m_Right: 8 455 | m_Top: 18 456 | m_Bottom: 8 457 | m_Margin: 458 | m_Left: 0 459 | m_Right: 0 460 | m_Top: 0 461 | m_Bottom: 0 462 | m_Padding: 463 | m_Left: 10 464 | m_Right: 10 465 | m_Top: 20 466 | m_Bottom: 10 467 | m_Overflow: 468 | m_Left: 0 469 | m_Right: 0 470 | m_Top: 0 471 | m_Bottom: 0 472 | m_Font: {fileID: 0} 473 | m_FontSize: 0 474 | m_FontStyle: 0 475 | m_Alignment: 1 476 | m_WordWrap: 0 477 | m_RichText: 1 478 | m_TextClipping: 1 479 | m_ImagePosition: 0 480 | m_ContentOffset: {x: 0, y: -18} 481 | m_FixedWidth: 0 482 | m_FixedHeight: 0 483 | m_StretchWidth: 1 484 | m_StretchHeight: 0 485 | m_horizontalSlider: 486 | m_Name: horizontalslider 487 | m_Normal: 488 | m_Background: {fileID: 11009, guid: 0000000000000000e000000000000000, type: 0} 489 | m_ScaledBackgrounds: [] 490 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 491 | m_Hover: 492 | m_Background: {fileID: 0} 493 | m_ScaledBackgrounds: [] 494 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 495 | m_Active: 496 | m_Background: {fileID: 0} 497 | m_ScaledBackgrounds: [] 498 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 499 | m_Focused: 500 | m_Background: {fileID: 0} 501 | m_ScaledBackgrounds: [] 502 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 503 | m_OnNormal: 504 | m_Background: {fileID: 0} 505 | m_ScaledBackgrounds: [] 506 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 507 | m_OnHover: 508 | m_Background: {fileID: 0} 509 | m_ScaledBackgrounds: [] 510 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 511 | m_OnActive: 512 | m_Background: {fileID: 0} 513 | m_ScaledBackgrounds: [] 514 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 515 | m_OnFocused: 516 | m_Background: {fileID: 0} 517 | m_ScaledBackgrounds: [] 518 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 519 | m_Border: 520 | m_Left: 3 521 | m_Right: 3 522 | m_Top: 0 523 | m_Bottom: 0 524 | m_Margin: 525 | m_Left: 4 526 | m_Right: 4 527 | m_Top: 4 528 | m_Bottom: 4 529 | m_Padding: 530 | m_Left: -1 531 | m_Right: -1 532 | m_Top: 0 533 | m_Bottom: 0 534 | m_Overflow: 535 | m_Left: 0 536 | m_Right: 0 537 | m_Top: -2 538 | m_Bottom: -3 539 | m_Font: {fileID: 0} 540 | m_FontSize: 0 541 | m_FontStyle: 0 542 | m_Alignment: 0 543 | m_WordWrap: 0 544 | m_RichText: 1 545 | m_TextClipping: 1 546 | m_ImagePosition: 2 547 | m_ContentOffset: {x: 0, y: 0} 548 | m_FixedWidth: 0 549 | m_FixedHeight: 12 550 | m_StretchWidth: 1 551 | m_StretchHeight: 0 552 | m_horizontalSliderThumb: 553 | m_Name: horizontalsliderthumb 554 | m_Normal: 555 | m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} 556 | m_ScaledBackgrounds: [] 557 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 558 | m_Hover: 559 | m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} 560 | m_ScaledBackgrounds: [] 561 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 562 | m_Active: 563 | m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} 564 | m_ScaledBackgrounds: [] 565 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 566 | m_Focused: 567 | m_Background: {fileID: 0} 568 | m_ScaledBackgrounds: [] 569 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 570 | m_OnNormal: 571 | m_Background: {fileID: 0} 572 | m_ScaledBackgrounds: [] 573 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 574 | m_OnHover: 575 | m_Background: {fileID: 0} 576 | m_ScaledBackgrounds: [] 577 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 578 | m_OnActive: 579 | m_Background: {fileID: 0} 580 | m_ScaledBackgrounds: [] 581 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 582 | m_OnFocused: 583 | m_Background: {fileID: 0} 584 | m_ScaledBackgrounds: [] 585 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 586 | m_Border: 587 | m_Left: 4 588 | m_Right: 4 589 | m_Top: 0 590 | m_Bottom: 0 591 | m_Margin: 592 | m_Left: 0 593 | m_Right: 0 594 | m_Top: 0 595 | m_Bottom: 0 596 | m_Padding: 597 | m_Left: 7 598 | m_Right: 7 599 | m_Top: 0 600 | m_Bottom: 0 601 | m_Overflow: 602 | m_Left: -1 603 | m_Right: -1 604 | m_Top: 0 605 | m_Bottom: 0 606 | m_Font: {fileID: 0} 607 | m_FontSize: 0 608 | m_FontStyle: 0 609 | m_Alignment: 0 610 | m_WordWrap: 0 611 | m_RichText: 1 612 | m_TextClipping: 1 613 | m_ImagePosition: 2 614 | m_ContentOffset: {x: 0, y: 0} 615 | m_FixedWidth: 0 616 | m_FixedHeight: 12 617 | m_StretchWidth: 1 618 | m_StretchHeight: 0 619 | m_verticalSlider: 620 | m_Name: verticalslider 621 | m_Normal: 622 | m_Background: {fileID: 11021, guid: 0000000000000000e000000000000000, type: 0} 623 | m_ScaledBackgrounds: [] 624 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 625 | m_Hover: 626 | m_Background: {fileID: 0} 627 | m_ScaledBackgrounds: [] 628 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 629 | m_Active: 630 | m_Background: {fileID: 0} 631 | m_ScaledBackgrounds: [] 632 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 633 | m_Focused: 634 | m_Background: {fileID: 0} 635 | m_ScaledBackgrounds: [] 636 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 637 | m_OnNormal: 638 | m_Background: {fileID: 0} 639 | m_ScaledBackgrounds: [] 640 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 641 | m_OnHover: 642 | m_Background: {fileID: 0} 643 | m_ScaledBackgrounds: [] 644 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 645 | m_OnActive: 646 | m_Background: {fileID: 0} 647 | m_ScaledBackgrounds: [] 648 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 649 | m_OnFocused: 650 | m_Background: {fileID: 0} 651 | m_ScaledBackgrounds: [] 652 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 653 | m_Border: 654 | m_Left: 0 655 | m_Right: 0 656 | m_Top: 3 657 | m_Bottom: 3 658 | m_Margin: 659 | m_Left: 4 660 | m_Right: 4 661 | m_Top: 4 662 | m_Bottom: 4 663 | m_Padding: 664 | m_Left: 0 665 | m_Right: 0 666 | m_Top: -1 667 | m_Bottom: -1 668 | m_Overflow: 669 | m_Left: -2 670 | m_Right: -3 671 | m_Top: 0 672 | m_Bottom: 0 673 | m_Font: {fileID: 0} 674 | m_FontSize: 0 675 | m_FontStyle: 0 676 | m_Alignment: 0 677 | m_WordWrap: 0 678 | m_RichText: 1 679 | m_TextClipping: 0 680 | m_ImagePosition: 0 681 | m_ContentOffset: {x: 0, y: 0} 682 | m_FixedWidth: 12 683 | m_FixedHeight: 0 684 | m_StretchWidth: 0 685 | m_StretchHeight: 1 686 | m_verticalSliderThumb: 687 | m_Name: verticalsliderthumb 688 | m_Normal: 689 | m_Background: {fileID: 11011, guid: 0000000000000000e000000000000000, type: 0} 690 | m_ScaledBackgrounds: [] 691 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 692 | m_Hover: 693 | m_Background: {fileID: 11012, guid: 0000000000000000e000000000000000, type: 0} 694 | m_ScaledBackgrounds: [] 695 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 696 | m_Active: 697 | m_Background: {fileID: 11010, guid: 0000000000000000e000000000000000, type: 0} 698 | m_ScaledBackgrounds: [] 699 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 700 | m_Focused: 701 | m_Background: {fileID: 0} 702 | m_ScaledBackgrounds: [] 703 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 704 | m_OnNormal: 705 | m_Background: {fileID: 0} 706 | m_ScaledBackgrounds: [] 707 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 708 | m_OnHover: 709 | m_Background: {fileID: 0} 710 | m_ScaledBackgrounds: [] 711 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 712 | m_OnActive: 713 | m_Background: {fileID: 0} 714 | m_ScaledBackgrounds: [] 715 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 716 | m_OnFocused: 717 | m_Background: {fileID: 0} 718 | m_ScaledBackgrounds: [] 719 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 720 | m_Border: 721 | m_Left: 0 722 | m_Right: 0 723 | m_Top: 0 724 | m_Bottom: 0 725 | m_Margin: 726 | m_Left: 0 727 | m_Right: 0 728 | m_Top: 0 729 | m_Bottom: 0 730 | m_Padding: 731 | m_Left: 0 732 | m_Right: 0 733 | m_Top: 7 734 | m_Bottom: 7 735 | m_Overflow: 736 | m_Left: 0 737 | m_Right: 0 738 | m_Top: -1 739 | m_Bottom: -1 740 | m_Font: {fileID: 0} 741 | m_FontSize: 0 742 | m_FontStyle: 0 743 | m_Alignment: 0 744 | m_WordWrap: 0 745 | m_RichText: 1 746 | m_TextClipping: 1 747 | m_ImagePosition: 0 748 | m_ContentOffset: {x: 0, y: 0} 749 | m_FixedWidth: 12 750 | m_FixedHeight: 0 751 | m_StretchWidth: 0 752 | m_StretchHeight: 1 753 | m_horizontalScrollbar: 754 | m_Name: horizontalscrollbar 755 | m_Normal: 756 | m_Background: {fileID: 11008, guid: 0000000000000000e000000000000000, type: 0} 757 | m_ScaledBackgrounds: [] 758 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 759 | m_Hover: 760 | m_Background: {fileID: 0} 761 | m_ScaledBackgrounds: [] 762 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 763 | m_Active: 764 | m_Background: {fileID: 0} 765 | m_ScaledBackgrounds: [] 766 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 767 | m_Focused: 768 | m_Background: {fileID: 0} 769 | m_ScaledBackgrounds: [] 770 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 771 | m_OnNormal: 772 | m_Background: {fileID: 0} 773 | m_ScaledBackgrounds: [] 774 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 775 | m_OnHover: 776 | m_Background: {fileID: 0} 777 | m_ScaledBackgrounds: [] 778 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 779 | m_OnActive: 780 | m_Background: {fileID: 0} 781 | m_ScaledBackgrounds: [] 782 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 783 | m_OnFocused: 784 | m_Background: {fileID: 0} 785 | m_ScaledBackgrounds: [] 786 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 787 | m_Border: 788 | m_Left: 9 789 | m_Right: 9 790 | m_Top: 0 791 | m_Bottom: 0 792 | m_Margin: 793 | m_Left: 4 794 | m_Right: 4 795 | m_Top: 1 796 | m_Bottom: 4 797 | m_Padding: 798 | m_Left: 0 799 | m_Right: 0 800 | m_Top: 0 801 | m_Bottom: 0 802 | m_Overflow: 803 | m_Left: 0 804 | m_Right: 0 805 | m_Top: 0 806 | m_Bottom: 0 807 | m_Font: {fileID: 0} 808 | m_FontSize: 0 809 | m_FontStyle: 0 810 | m_Alignment: 0 811 | m_WordWrap: 0 812 | m_RichText: 1 813 | m_TextClipping: 1 814 | m_ImagePosition: 2 815 | m_ContentOffset: {x: 0, y: 0} 816 | m_FixedWidth: 0 817 | m_FixedHeight: 15 818 | m_StretchWidth: 1 819 | m_StretchHeight: 0 820 | m_horizontalScrollbarThumb: 821 | m_Name: horizontalscrollbarthumb 822 | m_Normal: 823 | m_Background: {fileID: 11007, guid: 0000000000000000e000000000000000, type: 0} 824 | m_ScaledBackgrounds: [] 825 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 826 | m_Hover: 827 | m_Background: {fileID: 0} 828 | m_ScaledBackgrounds: [] 829 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 830 | m_Active: 831 | m_Background: {fileID: 0} 832 | m_ScaledBackgrounds: [] 833 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 834 | m_Focused: 835 | m_Background: {fileID: 0} 836 | m_ScaledBackgrounds: [] 837 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 838 | m_OnNormal: 839 | m_Background: {fileID: 0} 840 | m_ScaledBackgrounds: [] 841 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 842 | m_OnHover: 843 | m_Background: {fileID: 0} 844 | m_ScaledBackgrounds: [] 845 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 846 | m_OnActive: 847 | m_Background: {fileID: 0} 848 | m_ScaledBackgrounds: [] 849 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 850 | m_OnFocused: 851 | m_Background: {fileID: 0} 852 | m_ScaledBackgrounds: [] 853 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 854 | m_Border: 855 | m_Left: 6 856 | m_Right: 6 857 | m_Top: 6 858 | m_Bottom: 6 859 | m_Margin: 860 | m_Left: 0 861 | m_Right: 0 862 | m_Top: 0 863 | m_Bottom: 0 864 | m_Padding: 865 | m_Left: 6 866 | m_Right: 6 867 | m_Top: 0 868 | m_Bottom: 0 869 | m_Overflow: 870 | m_Left: 0 871 | m_Right: 0 872 | m_Top: -1 873 | m_Bottom: 1 874 | m_Font: {fileID: 0} 875 | m_FontSize: 0 876 | m_FontStyle: 0 877 | m_Alignment: 0 878 | m_WordWrap: 0 879 | m_RichText: 1 880 | m_TextClipping: 1 881 | m_ImagePosition: 0 882 | m_ContentOffset: {x: 0, y: 0} 883 | m_FixedWidth: 0 884 | m_FixedHeight: 13 885 | m_StretchWidth: 1 886 | m_StretchHeight: 0 887 | m_horizontalScrollbarLeftButton: 888 | m_Name: horizontalscrollbarleftbutton 889 | m_Normal: 890 | m_Background: {fileID: 0} 891 | m_ScaledBackgrounds: [] 892 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 893 | m_Hover: 894 | m_Background: {fileID: 0} 895 | m_ScaledBackgrounds: [] 896 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 897 | m_Active: 898 | m_Background: {fileID: 0} 899 | m_ScaledBackgrounds: [] 900 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 901 | m_Focused: 902 | m_Background: {fileID: 0} 903 | m_ScaledBackgrounds: [] 904 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 905 | m_OnNormal: 906 | m_Background: {fileID: 0} 907 | m_ScaledBackgrounds: [] 908 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 909 | m_OnHover: 910 | m_Background: {fileID: 0} 911 | m_ScaledBackgrounds: [] 912 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 913 | m_OnActive: 914 | m_Background: {fileID: 0} 915 | m_ScaledBackgrounds: [] 916 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 917 | m_OnFocused: 918 | m_Background: {fileID: 0} 919 | m_ScaledBackgrounds: [] 920 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 921 | m_Border: 922 | m_Left: 0 923 | m_Right: 0 924 | m_Top: 0 925 | m_Bottom: 0 926 | m_Margin: 927 | m_Left: 0 928 | m_Right: 0 929 | m_Top: 0 930 | m_Bottom: 0 931 | m_Padding: 932 | m_Left: 0 933 | m_Right: 0 934 | m_Top: 0 935 | m_Bottom: 0 936 | m_Overflow: 937 | m_Left: 0 938 | m_Right: 0 939 | m_Top: 0 940 | m_Bottom: 0 941 | m_Font: {fileID: 0} 942 | m_FontSize: 0 943 | m_FontStyle: 0 944 | m_Alignment: 0 945 | m_WordWrap: 0 946 | m_RichText: 1 947 | m_TextClipping: 1 948 | m_ImagePosition: 0 949 | m_ContentOffset: {x: 0, y: 0} 950 | m_FixedWidth: 0 951 | m_FixedHeight: 0 952 | m_StretchWidth: 1 953 | m_StretchHeight: 0 954 | m_horizontalScrollbarRightButton: 955 | m_Name: horizontalscrollbarrightbutton 956 | m_Normal: 957 | m_Background: {fileID: 0} 958 | m_ScaledBackgrounds: [] 959 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 960 | m_Hover: 961 | m_Background: {fileID: 0} 962 | m_ScaledBackgrounds: [] 963 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 964 | m_Active: 965 | m_Background: {fileID: 0} 966 | m_ScaledBackgrounds: [] 967 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 968 | m_Focused: 969 | m_Background: {fileID: 0} 970 | m_ScaledBackgrounds: [] 971 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 972 | m_OnNormal: 973 | m_Background: {fileID: 0} 974 | m_ScaledBackgrounds: [] 975 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 976 | m_OnHover: 977 | m_Background: {fileID: 0} 978 | m_ScaledBackgrounds: [] 979 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 980 | m_OnActive: 981 | m_Background: {fileID: 0} 982 | m_ScaledBackgrounds: [] 983 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 984 | m_OnFocused: 985 | m_Background: {fileID: 0} 986 | m_ScaledBackgrounds: [] 987 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 988 | m_Border: 989 | m_Left: 0 990 | m_Right: 0 991 | m_Top: 0 992 | m_Bottom: 0 993 | m_Margin: 994 | m_Left: 0 995 | m_Right: 0 996 | m_Top: 0 997 | m_Bottom: 0 998 | m_Padding: 999 | m_Left: 0 1000 | m_Right: 0 1001 | m_Top: 0 1002 | m_Bottom: 0 1003 | m_Overflow: 1004 | m_Left: 0 1005 | m_Right: 0 1006 | m_Top: 0 1007 | m_Bottom: 0 1008 | m_Font: {fileID: 0} 1009 | m_FontSize: 0 1010 | m_FontStyle: 0 1011 | m_Alignment: 0 1012 | m_WordWrap: 0 1013 | m_RichText: 1 1014 | m_TextClipping: 1 1015 | m_ImagePosition: 0 1016 | m_ContentOffset: {x: 0, y: 0} 1017 | m_FixedWidth: 0 1018 | m_FixedHeight: 0 1019 | m_StretchWidth: 1 1020 | m_StretchHeight: 0 1021 | m_verticalScrollbar: 1022 | m_Name: verticalscrollbar 1023 | m_Normal: 1024 | m_Background: {fileID: 11020, guid: 0000000000000000e000000000000000, type: 0} 1025 | m_ScaledBackgrounds: [] 1026 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1027 | m_Hover: 1028 | m_Background: {fileID: 0} 1029 | m_ScaledBackgrounds: [] 1030 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1031 | m_Active: 1032 | m_Background: {fileID: 0} 1033 | m_ScaledBackgrounds: [] 1034 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1035 | m_Focused: 1036 | m_Background: {fileID: 0} 1037 | m_ScaledBackgrounds: [] 1038 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1039 | m_OnNormal: 1040 | m_Background: {fileID: 0} 1041 | m_ScaledBackgrounds: [] 1042 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1043 | m_OnHover: 1044 | m_Background: {fileID: 0} 1045 | m_ScaledBackgrounds: [] 1046 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1047 | m_OnActive: 1048 | m_Background: {fileID: 0} 1049 | m_ScaledBackgrounds: [] 1050 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1051 | m_OnFocused: 1052 | m_Background: {fileID: 0} 1053 | m_ScaledBackgrounds: [] 1054 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1055 | m_Border: 1056 | m_Left: 0 1057 | m_Right: 0 1058 | m_Top: 9 1059 | m_Bottom: 9 1060 | m_Margin: 1061 | m_Left: 1 1062 | m_Right: 4 1063 | m_Top: 4 1064 | m_Bottom: 4 1065 | m_Padding: 1066 | m_Left: 0 1067 | m_Right: 0 1068 | m_Top: 1 1069 | m_Bottom: 1 1070 | m_Overflow: 1071 | m_Left: 0 1072 | m_Right: 0 1073 | m_Top: 0 1074 | m_Bottom: 0 1075 | m_Font: {fileID: 0} 1076 | m_FontSize: 0 1077 | m_FontStyle: 0 1078 | m_Alignment: 0 1079 | m_WordWrap: 0 1080 | m_RichText: 1 1081 | m_TextClipping: 1 1082 | m_ImagePosition: 0 1083 | m_ContentOffset: {x: 0, y: 0} 1084 | m_FixedWidth: 15 1085 | m_FixedHeight: 0 1086 | m_StretchWidth: 1 1087 | m_StretchHeight: 0 1088 | m_verticalScrollbarThumb: 1089 | m_Name: verticalscrollbarthumb 1090 | m_Normal: 1091 | m_Background: {fileID: 11019, guid: 0000000000000000e000000000000000, type: 0} 1092 | m_ScaledBackgrounds: [] 1093 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1094 | m_Hover: 1095 | m_Background: {fileID: 0} 1096 | m_ScaledBackgrounds: [] 1097 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1098 | m_Active: 1099 | m_Background: {fileID: 0} 1100 | m_ScaledBackgrounds: [] 1101 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1102 | m_Focused: 1103 | m_Background: {fileID: 0} 1104 | m_ScaledBackgrounds: [] 1105 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1106 | m_OnNormal: 1107 | m_Background: {fileID: 0} 1108 | m_ScaledBackgrounds: [] 1109 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1110 | m_OnHover: 1111 | m_Background: {fileID: 0} 1112 | m_ScaledBackgrounds: [] 1113 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1114 | m_OnActive: 1115 | m_Background: {fileID: 0} 1116 | m_ScaledBackgrounds: [] 1117 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1118 | m_OnFocused: 1119 | m_Background: {fileID: 0} 1120 | m_ScaledBackgrounds: [] 1121 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1122 | m_Border: 1123 | m_Left: 6 1124 | m_Right: 6 1125 | m_Top: 6 1126 | m_Bottom: 6 1127 | m_Margin: 1128 | m_Left: 0 1129 | m_Right: 0 1130 | m_Top: 0 1131 | m_Bottom: 0 1132 | m_Padding: 1133 | m_Left: 0 1134 | m_Right: 0 1135 | m_Top: 6 1136 | m_Bottom: 6 1137 | m_Overflow: 1138 | m_Left: -1 1139 | m_Right: -1 1140 | m_Top: 0 1141 | m_Bottom: 0 1142 | m_Font: {fileID: 0} 1143 | m_FontSize: 0 1144 | m_FontStyle: 0 1145 | m_Alignment: 0 1146 | m_WordWrap: 0 1147 | m_RichText: 1 1148 | m_TextClipping: 1 1149 | m_ImagePosition: 2 1150 | m_ContentOffset: {x: 0, y: 0} 1151 | m_FixedWidth: 15 1152 | m_FixedHeight: 0 1153 | m_StretchWidth: 0 1154 | m_StretchHeight: 1 1155 | m_verticalScrollbarUpButton: 1156 | m_Name: verticalscrollbarupbutton 1157 | m_Normal: 1158 | m_Background: {fileID: 0} 1159 | m_ScaledBackgrounds: [] 1160 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1161 | m_Hover: 1162 | m_Background: {fileID: 0} 1163 | m_ScaledBackgrounds: [] 1164 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1165 | m_Active: 1166 | m_Background: {fileID: 0} 1167 | m_ScaledBackgrounds: [] 1168 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1169 | m_Focused: 1170 | m_Background: {fileID: 0} 1171 | m_ScaledBackgrounds: [] 1172 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1173 | m_OnNormal: 1174 | m_Background: {fileID: 0} 1175 | m_ScaledBackgrounds: [] 1176 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1177 | m_OnHover: 1178 | m_Background: {fileID: 0} 1179 | m_ScaledBackgrounds: [] 1180 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1181 | m_OnActive: 1182 | m_Background: {fileID: 0} 1183 | m_ScaledBackgrounds: [] 1184 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1185 | m_OnFocused: 1186 | m_Background: {fileID: 0} 1187 | m_ScaledBackgrounds: [] 1188 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1189 | m_Border: 1190 | m_Left: 0 1191 | m_Right: 0 1192 | m_Top: 0 1193 | m_Bottom: 0 1194 | m_Margin: 1195 | m_Left: 0 1196 | m_Right: 0 1197 | m_Top: 0 1198 | m_Bottom: 0 1199 | m_Padding: 1200 | m_Left: 0 1201 | m_Right: 0 1202 | m_Top: 0 1203 | m_Bottom: 0 1204 | m_Overflow: 1205 | m_Left: 0 1206 | m_Right: 0 1207 | m_Top: 0 1208 | m_Bottom: 0 1209 | m_Font: {fileID: 0} 1210 | m_FontSize: 0 1211 | m_FontStyle: 0 1212 | m_Alignment: 0 1213 | m_WordWrap: 0 1214 | m_RichText: 1 1215 | m_TextClipping: 1 1216 | m_ImagePosition: 0 1217 | m_ContentOffset: {x: 0, y: 0} 1218 | m_FixedWidth: 0 1219 | m_FixedHeight: 0 1220 | m_StretchWidth: 1 1221 | m_StretchHeight: 0 1222 | m_verticalScrollbarDownButton: 1223 | m_Name: verticalscrollbardownbutton 1224 | m_Normal: 1225 | m_Background: {fileID: 0} 1226 | m_ScaledBackgrounds: [] 1227 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1228 | m_Hover: 1229 | m_Background: {fileID: 0} 1230 | m_ScaledBackgrounds: [] 1231 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1232 | m_Active: 1233 | m_Background: {fileID: 0} 1234 | m_ScaledBackgrounds: [] 1235 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1236 | m_Focused: 1237 | m_Background: {fileID: 0} 1238 | m_ScaledBackgrounds: [] 1239 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1240 | m_OnNormal: 1241 | m_Background: {fileID: 0} 1242 | m_ScaledBackgrounds: [] 1243 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1244 | m_OnHover: 1245 | m_Background: {fileID: 0} 1246 | m_ScaledBackgrounds: [] 1247 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1248 | m_OnActive: 1249 | m_Background: {fileID: 0} 1250 | m_ScaledBackgrounds: [] 1251 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1252 | m_OnFocused: 1253 | m_Background: {fileID: 0} 1254 | m_ScaledBackgrounds: [] 1255 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1256 | m_Border: 1257 | m_Left: 0 1258 | m_Right: 0 1259 | m_Top: 0 1260 | m_Bottom: 0 1261 | m_Margin: 1262 | m_Left: 0 1263 | m_Right: 0 1264 | m_Top: 0 1265 | m_Bottom: 0 1266 | m_Padding: 1267 | m_Left: 0 1268 | m_Right: 0 1269 | m_Top: 0 1270 | m_Bottom: 0 1271 | m_Overflow: 1272 | m_Left: 0 1273 | m_Right: 0 1274 | m_Top: 0 1275 | m_Bottom: 0 1276 | m_Font: {fileID: 0} 1277 | m_FontSize: 0 1278 | m_FontStyle: 0 1279 | m_Alignment: 0 1280 | m_WordWrap: 0 1281 | m_RichText: 1 1282 | m_TextClipping: 1 1283 | m_ImagePosition: 0 1284 | m_ContentOffset: {x: 0, y: 0} 1285 | m_FixedWidth: 0 1286 | m_FixedHeight: 0 1287 | m_StretchWidth: 1 1288 | m_StretchHeight: 0 1289 | m_ScrollView: 1290 | m_Name: scrollview 1291 | m_Normal: 1292 | m_Background: {fileID: 0} 1293 | m_ScaledBackgrounds: [] 1294 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1295 | m_Hover: 1296 | m_Background: {fileID: 0} 1297 | m_ScaledBackgrounds: [] 1298 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1299 | m_Active: 1300 | m_Background: {fileID: 0} 1301 | m_ScaledBackgrounds: [] 1302 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1303 | m_Focused: 1304 | m_Background: {fileID: 0} 1305 | m_ScaledBackgrounds: [] 1306 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1307 | m_OnNormal: 1308 | m_Background: {fileID: 0} 1309 | m_ScaledBackgrounds: [] 1310 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1311 | m_OnHover: 1312 | m_Background: {fileID: 0} 1313 | m_ScaledBackgrounds: [] 1314 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1315 | m_OnActive: 1316 | m_Background: {fileID: 0} 1317 | m_ScaledBackgrounds: [] 1318 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1319 | m_OnFocused: 1320 | m_Background: {fileID: 0} 1321 | m_ScaledBackgrounds: [] 1322 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1323 | m_Border: 1324 | m_Left: 0 1325 | m_Right: 0 1326 | m_Top: 0 1327 | m_Bottom: 0 1328 | m_Margin: 1329 | m_Left: 0 1330 | m_Right: 0 1331 | m_Top: 0 1332 | m_Bottom: 0 1333 | m_Padding: 1334 | m_Left: 0 1335 | m_Right: 0 1336 | m_Top: 0 1337 | m_Bottom: 0 1338 | m_Overflow: 1339 | m_Left: 0 1340 | m_Right: 0 1341 | m_Top: 0 1342 | m_Bottom: 0 1343 | m_Font: {fileID: 0} 1344 | m_FontSize: 0 1345 | m_FontStyle: 0 1346 | m_Alignment: 0 1347 | m_WordWrap: 0 1348 | m_RichText: 1 1349 | m_TextClipping: 1 1350 | m_ImagePosition: 0 1351 | m_ContentOffset: {x: 0, y: 0} 1352 | m_FixedWidth: 0 1353 | m_FixedHeight: 0 1354 | m_StretchWidth: 1 1355 | m_StretchHeight: 0 1356 | m_CustomStyles: 1357 | - m_Name: thumb 1358 | m_Normal: 1359 | m_Background: {fileID: 0} 1360 | m_ScaledBackgrounds: [] 1361 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1362 | m_Hover: 1363 | m_Background: {fileID: 0} 1364 | m_ScaledBackgrounds: [] 1365 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1366 | m_Active: 1367 | m_Background: {fileID: 0} 1368 | m_ScaledBackgrounds: [] 1369 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1370 | m_Focused: 1371 | m_Background: {fileID: 0} 1372 | m_ScaledBackgrounds: [] 1373 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1374 | m_OnNormal: 1375 | m_Background: {fileID: 0} 1376 | m_ScaledBackgrounds: [] 1377 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1378 | m_OnHover: 1379 | m_Background: {fileID: 0} 1380 | m_ScaledBackgrounds: [] 1381 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1382 | m_OnActive: 1383 | m_Background: {fileID: 0} 1384 | m_ScaledBackgrounds: [] 1385 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1386 | m_OnFocused: 1387 | m_Background: {fileID: 0} 1388 | m_ScaledBackgrounds: [] 1389 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1390 | m_Border: 1391 | m_Left: 0 1392 | m_Right: 0 1393 | m_Top: 0 1394 | m_Bottom: 0 1395 | m_Margin: 1396 | m_Left: 0 1397 | m_Right: 0 1398 | m_Top: 0 1399 | m_Bottom: 0 1400 | m_Padding: 1401 | m_Left: 0 1402 | m_Right: 0 1403 | m_Top: 0 1404 | m_Bottom: 0 1405 | m_Overflow: 1406 | m_Left: 0 1407 | m_Right: 0 1408 | m_Top: 0 1409 | m_Bottom: 0 1410 | m_Font: {fileID: 0} 1411 | m_FontSize: 0 1412 | m_FontStyle: 0 1413 | m_Alignment: 0 1414 | m_WordWrap: 0 1415 | m_RichText: 1 1416 | m_TextClipping: 0 1417 | m_ImagePosition: 0 1418 | m_ContentOffset: {x: 0, y: 0} 1419 | m_FixedWidth: 0 1420 | m_FixedHeight: 0 1421 | m_StretchWidth: 1 1422 | m_StretchHeight: 0 1423 | - m_Name: leftbutton 1424 | m_Normal: 1425 | m_Background: {fileID: 0} 1426 | m_ScaledBackgrounds: [] 1427 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1428 | m_Hover: 1429 | m_Background: {fileID: 0} 1430 | m_ScaledBackgrounds: [] 1431 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1432 | m_Active: 1433 | m_Background: {fileID: 0} 1434 | m_ScaledBackgrounds: [] 1435 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1436 | m_Focused: 1437 | m_Background: {fileID: 0} 1438 | m_ScaledBackgrounds: [] 1439 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1440 | m_OnNormal: 1441 | m_Background: {fileID: 0} 1442 | m_ScaledBackgrounds: [] 1443 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1444 | m_OnHover: 1445 | m_Background: {fileID: 0} 1446 | m_ScaledBackgrounds: [] 1447 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1448 | m_OnActive: 1449 | m_Background: {fileID: 0} 1450 | m_ScaledBackgrounds: [] 1451 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1452 | m_OnFocused: 1453 | m_Background: {fileID: 0} 1454 | m_ScaledBackgrounds: [] 1455 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1456 | m_Border: 1457 | m_Left: 0 1458 | m_Right: 0 1459 | m_Top: 0 1460 | m_Bottom: 0 1461 | m_Margin: 1462 | m_Left: 0 1463 | m_Right: 0 1464 | m_Top: 0 1465 | m_Bottom: 0 1466 | m_Padding: 1467 | m_Left: 0 1468 | m_Right: 0 1469 | m_Top: 0 1470 | m_Bottom: 0 1471 | m_Overflow: 1472 | m_Left: 0 1473 | m_Right: 0 1474 | m_Top: 0 1475 | m_Bottom: 0 1476 | m_Font: {fileID: 0} 1477 | m_FontSize: 0 1478 | m_FontStyle: 0 1479 | m_Alignment: 0 1480 | m_WordWrap: 0 1481 | m_RichText: 1 1482 | m_TextClipping: 0 1483 | m_ImagePosition: 0 1484 | m_ContentOffset: {x: 0, y: 0} 1485 | m_FixedWidth: 0 1486 | m_FixedHeight: 0 1487 | m_StretchWidth: 1 1488 | m_StretchHeight: 0 1489 | - m_Name: rightbutton 1490 | m_Normal: 1491 | m_Background: {fileID: 0} 1492 | m_ScaledBackgrounds: [] 1493 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1494 | m_Hover: 1495 | m_Background: {fileID: 0} 1496 | m_ScaledBackgrounds: [] 1497 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1498 | m_Active: 1499 | m_Background: {fileID: 0} 1500 | m_ScaledBackgrounds: [] 1501 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1502 | m_Focused: 1503 | m_Background: {fileID: 0} 1504 | m_ScaledBackgrounds: [] 1505 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1506 | m_OnNormal: 1507 | m_Background: {fileID: 0} 1508 | m_ScaledBackgrounds: [] 1509 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1510 | m_OnHover: 1511 | m_Background: {fileID: 0} 1512 | m_ScaledBackgrounds: [] 1513 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1514 | m_OnActive: 1515 | m_Background: {fileID: 0} 1516 | m_ScaledBackgrounds: [] 1517 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1518 | m_OnFocused: 1519 | m_Background: {fileID: 0} 1520 | m_ScaledBackgrounds: [] 1521 | m_TextColor: {r: 0, g: 0, b: 0, a: 1} 1522 | m_Border: 1523 | m_Left: 0 1524 | m_Right: 0 1525 | m_Top: 0 1526 | m_Bottom: 0 1527 | m_Margin: 1528 | m_Left: 0 1529 | m_Right: 0 1530 | m_Top: 0 1531 | m_Bottom: 0 1532 | m_Padding: 1533 | m_Left: 0 1534 | m_Right: 0 1535 | m_Top: 0 1536 | m_Bottom: 0 1537 | m_Overflow: 1538 | m_Left: 0 1539 | m_Right: 0 1540 | m_Top: 0 1541 | m_Bottom: 0 1542 | m_Font: {fileID: 0} 1543 | m_FontSize: 0 1544 | m_FontStyle: 0 1545 | m_Alignment: 0 1546 | m_WordWrap: 0 1547 | m_RichText: 1 1548 | m_TextClipping: 0 1549 | m_ImagePosition: 0 1550 | m_ContentOffset: {x: 0, y: 0} 1551 | m_FixedWidth: 0 1552 | m_FixedHeight: 0 1553 | m_StretchWidth: 1 1554 | m_StretchHeight: 0 1555 | m_Settings: 1556 | m_DoubleClickSelectsWord: 1 1557 | m_TripleClickSelectsLine: 1 1558 | m_CursorColor: {r: 1, g: 1, b: 1, a: 1} 1559 | m_CursorFlashSpeed: -1 1560 | m_SelectionColor: {r: 1, g: 0.38403907, b: 0, a: 0.7} 1561 | -------------------------------------------------------------------------------- /Editor/gui scene skin.guiskin.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0d4926bd5afd7145a14fbb97d4ce700 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MephestoKhaan/UnityEventVisualizer/333052e19ea5df032d5338a5af8162d8530605c9/Editor/white.png -------------------------------------------------------------------------------- /Editor/white.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaa26defe76d3ff47a15556ac0e00b2b 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 4 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: 1 33 | aniso: 1 34 | mipBias: -100 35 | wrapU: 1 36 | wrapV: 1 37 | wrapW: 1 38 | nPOTScale: 0 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 0 49 | alphaUsage: 1 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 2 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | resizeAlgorithm: 0 61 | textureFormat: -1 62 | textureCompression: 0 63 | compressionQuality: 50 64 | crunchedCompression: 0 65 | allowsAlphaSplitting: 0 66 | overridden: 0 67 | androidETC2FallbackOverride: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | - buildTarget: Android 79 | maxTextureSize: 2048 80 | resizeAlgorithm: 0 81 | textureFormat: -1 82 | textureCompression: 0 83 | compressionQuality: 50 84 | crunchedCompression: 0 85 | allowsAlphaSplitting: 0 86 | overridden: 0 87 | androidETC2FallbackOverride: 0 88 | - buildTarget: WebGL 89 | maxTextureSize: 2048 90 | resizeAlgorithm: 0 91 | textureFormat: -1 92 | textureCompression: 0 93 | compressionQuality: 50 94 | crunchedCompression: 0 95 | allowsAlphaSplitting: 0 96 | overridden: 0 97 | androidETC2FallbackOverride: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | spritePackingTag: 104 | userData: 105 | assetBundleName: 106 | assetBundleVariant: 107 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2020] [Luca Mefisto] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd4a495518c2e724eaa17886449e06c6 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityEventVisualizer 2 | 3 | [![openupm](https://img.shields.io/npm/v/com.mefistofiles.unity-event-visualizer?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/com.mefistofiles.unity-event-visualizer/) 4 | 5 | 6 | Now also available at the [Unity asset store](https://assetstore.unity.com/packages/tools/utilities/event-visualizer-163380)! (free, reviews appreciated) 7 | 8 |

What

9 | Have you ever come across a project that abuses linking UnityEvents in the inspector and now you can not find who is calling what? 10 | Unity Event Visualizer is a visual tool that allows you to see all the UnityEvents in a scene at a glance and when they are being triggered. It creates a graph in which nodes are gameobjects, outputs are any type of UnityEvent (custom ones supported as well!) and inputs are methods. 11 | 12 | ![Animation](https://media.giphy.com/media/cA3VUiWT0FIlKebCRS/giphy.gif) 13 | 14 | ![SceneView](https://media.giphy.com/media/AFvTp2k8L5R1pKXJZA/giphy.gif) 15 | 16 |

Install

17 | 18 | **Via OpenUPM** 19 | 20 | The package is available on the [openupm registry](https://openupm.com). It's recommended to install it via [openupm-cli](https://github.com/openupm/openupm-cli). 21 | 22 | ``` 23 | openupm add com.mefistofiles.unity-event-visualizer 24 | ``` 25 | 26 | **Via Git URL** 27 | 28 | Open Packages/manifest.json with your favorite text editor. Add the following line to the dependencies block. 29 | 30 | ``` 31 | "com.mefistofiles.unity-event-visualizer": "https://github.com/MephestoKhaan/UnityEventVisualizer.git" 32 | ``` 33 | 34 | **Via .unitypackage** 35 | 36 | Grab the installer from the Releases section and import it into your project. 37 | 38 | **Via Unity asset store** 39 | 40 | Download it directly from the [Unity asset store](https://assetstore.unity.com/packages/tools/utilities/event-visualizer-163380). 41 | 42 | 43 |

How

44 | 45 | - Select ```Windows/Events Graph Editor``` you can open the graph. 46 | ![Selector](https://media.giphy.com/media/l1J9LcPkjgvxoUsBW/giphy.gif) 47 | - Select any root gameobject(s) and click on ```Rebuild on selected hierarchy``` to generate a graph 48 | of all events being fired by the selected hierarchy, or ```Rebuild JUST selected``` to generate a 49 | graph of all events being fired by exactly the selected gameobjects. You can deselect everything and 50 | click any of the buttons to generate the graph of the entire scene, but beware for massive graphs! 51 | 52 | 53 | 54 | - Click on any node to highlight that gameobjects in your hiearchy. 55 | Alternatively right-click on any element in the hierarchy and select ```UnityEventGraph/FindThis``` 56 | to highlight it in the graph. Or ```UnityEventGraph/Graph Just This``` and ```UnityEventGraph/Graph This Hierarchy``` 57 | in order to create a graph starting just in this gameobject or any of its children respectively. 58 | ![Finder](https://media.giphy.com/media/3ohhwhMwWW0URb8mfS/giphy.gif) 59 | 60 | - Scene View https://www.youtube.com/watch?v=IhG0LRFLmdo. 61 | [![Scene View preview](http://i3.ytimg.com/vi/IhG0LRFLmdo/hqdefault.jpg)](https://www.youtube.com/watch?v=IhG0LRFLmdo) 62 | 63 | Pull requests welcome! 64 | 65 |

Who

66 | 67 | - Original idea by [SoylentGraham](https://github.com/SoylentGraham) 68 | - Code by [Luca Mefisto](https://github.com/MephestoKhaan) (myself) 69 | - Inspired by [Keijiro Takahashi](https://github.com/keijiro) 70 | - SceneView representation by [Andrés Leone](https://github.com/forestrf) 71 | -------------------------------------------------------------------------------- /ReadMe.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b88cef69f4b009449a5c80773ced781d 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/CustomEventTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Events; 5 | 6 | public class CustomEventTest : MonoBehaviour 7 | { 8 | public UnityEvent simpleEvent; 9 | public CustomComplexEvent complexEvent; 10 | 11 | public ScriptableObjectEventTest soTest; 12 | 13 | public void TriggerSimpleEvent() 14 | { 15 | if(simpleEvent != null) 16 | { 17 | simpleEvent.Invoke(); 18 | } 19 | } 20 | 21 | public void TriggerComplexEvent() 22 | { 23 | if (complexEvent != null) 24 | { 25 | complexEvent.Invoke("a", 1, 2); 26 | } 27 | StartCoroutine(DelayedTrigger("Test", 0, 1)); 28 | } 29 | 30 | private IEnumerator DelayedTrigger(string message, int a, int b) 31 | { 32 | for(int i = 0; i < 20; i++) 33 | { 34 | yield return new WaitForSeconds(0.1f); 35 | if (complexEvent != null) 36 | { 37 | complexEvent.Invoke(message, a, b); 38 | } 39 | } 40 | } 41 | } 42 | 43 | [System.Serializable] 44 | public class CustomComplexEvent : UnityEvent { } 45 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/CustomEventTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e4a01b9184ba6f41a977ffe750cfe03 3 | timeCreated: 1512471748 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/EventVisualizer.Demo.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EventVisualizer.Demo", 3 | "references": [], 4 | "optionalUnityReferences": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": false, 11 | "defineConstraints": [] 12 | } -------------------------------------------------------------------------------- /Samples~/GeneralEvents/EventVisualizer.Demo.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55a8720238c1ce447ab1359e6f37c2a4 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/EventVisualizerDemo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &283302696 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 283302700} 133 | - component: {fileID: 283302699} 134 | - component: {fileID: 283302698} 135 | - component: {fileID: 283302697} 136 | m_Layer: 5 137 | m_Name: Canvas 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!114 &283302697 144 | MonoBehaviour: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 283302696} 150 | m_Enabled: 1 151 | m_EditorHideFlags: 0 152 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 153 | m_Name: 154 | m_EditorClassIdentifier: 155 | m_IgnoreReversedGraphics: 1 156 | m_BlockingObjects: 0 157 | m_BlockingMask: 158 | serializedVersion: 2 159 | m_Bits: 4294967295 160 | --- !u!114 &283302698 161 | MonoBehaviour: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 283302696} 167 | m_Enabled: 1 168 | m_EditorHideFlags: 0 169 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 170 | m_Name: 171 | m_EditorClassIdentifier: 172 | m_UiScaleMode: 0 173 | m_ReferencePixelsPerUnit: 100 174 | m_ScaleFactor: 1 175 | m_ReferenceResolution: {x: 800, y: 600} 176 | m_ScreenMatchMode: 0 177 | m_MatchWidthOrHeight: 0 178 | m_PhysicalUnit: 3 179 | m_FallbackScreenDPI: 96 180 | m_DefaultSpriteDPI: 96 181 | m_DynamicPixelsPerUnit: 1 182 | --- !u!223 &283302699 183 | Canvas: 184 | m_ObjectHideFlags: 0 185 | m_CorrespondingSourceObject: {fileID: 0} 186 | m_PrefabInstance: {fileID: 0} 187 | m_PrefabAsset: {fileID: 0} 188 | m_GameObject: {fileID: 283302696} 189 | m_Enabled: 1 190 | serializedVersion: 3 191 | m_RenderMode: 0 192 | m_Camera: {fileID: 0} 193 | m_PlaneDistance: 100 194 | m_PixelPerfect: 0 195 | m_ReceivesEvents: 1 196 | m_OverrideSorting: 0 197 | m_OverridePixelPerfect: 0 198 | m_SortingBucketNormalizedSize: 0 199 | m_AdditionalShaderChannelsFlag: 0 200 | m_SortingLayerID: 0 201 | m_SortingOrder: 0 202 | m_TargetDisplay: 0 203 | --- !u!224 &283302700 204 | RectTransform: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | m_GameObject: {fileID: 283302696} 210 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 211 | m_LocalPosition: {x: 0, y: 0, z: 0} 212 | m_LocalScale: {x: 0, y: 0, z: 0} 213 | m_Children: 214 | - {fileID: 1688619941} 215 | m_Father: {fileID: 0} 216 | m_RootOrder: 3 217 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 218 | m_AnchorMin: {x: 0, y: 0} 219 | m_AnchorMax: {x: 0, y: 0} 220 | m_AnchoredPosition: {x: 0, y: 0} 221 | m_SizeDelta: {x: 0, y: 0} 222 | m_Pivot: {x: 0, y: 0} 223 | --- !u!1 &404605670 224 | GameObject: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | serializedVersion: 6 230 | m_Component: 231 | - component: {fileID: 404605674} 232 | - component: {fileID: 404605673} 233 | - component: {fileID: 404605672} 234 | - component: {fileID: 404605671} 235 | - component: {fileID: 404605675} 236 | m_Layer: 0 237 | m_Name: Main Camera 238 | m_TagString: MainCamera 239 | m_Icon: {fileID: 0} 240 | m_NavMeshLayer: 0 241 | m_StaticEditorFlags: 0 242 | m_IsActive: 1 243 | --- !u!81 &404605671 244 | AudioListener: 245 | m_ObjectHideFlags: 0 246 | m_CorrespondingSourceObject: {fileID: 0} 247 | m_PrefabInstance: {fileID: 0} 248 | m_PrefabAsset: {fileID: 0} 249 | m_GameObject: {fileID: 404605670} 250 | m_Enabled: 1 251 | --- !u!124 &404605672 252 | Behaviour: 253 | m_ObjectHideFlags: 0 254 | m_CorrespondingSourceObject: {fileID: 0} 255 | m_PrefabInstance: {fileID: 0} 256 | m_PrefabAsset: {fileID: 0} 257 | m_GameObject: {fileID: 404605670} 258 | m_Enabled: 1 259 | --- !u!20 &404605673 260 | Camera: 261 | m_ObjectHideFlags: 0 262 | m_CorrespondingSourceObject: {fileID: 0} 263 | m_PrefabInstance: {fileID: 0} 264 | m_PrefabAsset: {fileID: 0} 265 | m_GameObject: {fileID: 404605670} 266 | m_Enabled: 1 267 | serializedVersion: 2 268 | m_ClearFlags: 1 269 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 270 | m_projectionMatrixMode: 1 271 | m_GateFitMode: 2 272 | m_FOVAxisMode: 0 273 | m_SensorSize: {x: 36, y: 24} 274 | m_LensShift: {x: 0, y: 0} 275 | m_FocalLength: 50 276 | m_NormalizedViewPortRect: 277 | serializedVersion: 2 278 | x: 0 279 | y: 0 280 | width: 1 281 | height: 1 282 | near clip plane: 0.3 283 | far clip plane: 1000 284 | field of view: 60 285 | orthographic: 0 286 | orthographic size: 5 287 | m_Depth: -1 288 | m_CullingMask: 289 | serializedVersion: 2 290 | m_Bits: 4294967295 291 | m_RenderingPath: -1 292 | m_TargetTexture: {fileID: 0} 293 | m_TargetDisplay: 0 294 | m_TargetEye: 3 295 | m_HDR: 1 296 | m_AllowMSAA: 1 297 | m_AllowDynamicResolution: 0 298 | m_ForceIntoRT: 0 299 | m_OcclusionCulling: 1 300 | m_StereoConvergence: 10 301 | m_StereoSeparation: 0.022 302 | --- !u!4 &404605674 303 | Transform: 304 | m_ObjectHideFlags: 0 305 | m_CorrespondingSourceObject: {fileID: 0} 306 | m_PrefabInstance: {fileID: 0} 307 | m_PrefabAsset: {fileID: 0} 308 | m_GameObject: {fileID: 404605670} 309 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 310 | m_LocalPosition: {x: 0, y: 1, z: -10} 311 | m_LocalScale: {x: 1, y: 1, z: 1} 312 | m_Children: [] 313 | m_Father: {fileID: 0} 314 | m_RootOrder: 0 315 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 316 | --- !u!114 &404605675 317 | MonoBehaviour: 318 | m_ObjectHideFlags: 0 319 | m_CorrespondingSourceObject: {fileID: 0} 320 | m_PrefabInstance: {fileID: 0} 321 | m_PrefabAsset: {fileID: 0} 322 | m_GameObject: {fileID: 404605670} 323 | m_Enabled: 1 324 | m_EditorHideFlags: 0 325 | m_Script: {fileID: 11500000, guid: c49b4cc203aa6414fae5c798d1d0e7d6, type: 3} 326 | m_Name: 327 | m_EditorClassIdentifier: 328 | m_EventMask: 329 | serializedVersion: 2 330 | m_Bits: 4294967295 331 | m_MaxRayIntersections: 0 332 | --- !u!1 &717110253 333 | GameObject: 334 | m_ObjectHideFlags: 0 335 | m_CorrespondingSourceObject: {fileID: 0} 336 | m_PrefabInstance: {fileID: 0} 337 | m_PrefabAsset: {fileID: 0} 338 | serializedVersion: 6 339 | m_Component: 340 | - component: {fileID: 717110258} 341 | - component: {fileID: 717110257} 342 | - component: {fileID: 717110256} 343 | - component: {fileID: 717110255} 344 | - component: {fileID: 717110254} 345 | - component: {fileID: 717110259} 346 | m_Layer: 0 347 | m_Name: CustomEvent 348 | m_TagString: Untagged 349 | m_Icon: {fileID: 0} 350 | m_NavMeshLayer: 0 351 | m_StaticEditorFlags: 0 352 | m_IsActive: 1 353 | --- !u!114 &717110254 354 | MonoBehaviour: 355 | m_ObjectHideFlags: 0 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInstance: {fileID: 0} 358 | m_PrefabAsset: {fileID: 0} 359 | m_GameObject: {fileID: 717110253} 360 | m_Enabled: 1 361 | m_EditorHideFlags: 0 362 | m_Script: {fileID: 11500000, guid: 1e4a01b9184ba6f41a977ffe750cfe03, type: 3} 363 | m_Name: 364 | m_EditorClassIdentifier: 365 | simpleEvent: 366 | m_PersistentCalls: 367 | m_Calls: 368 | - m_Target: {fileID: 1143639853} 369 | m_MethodName: set_intensity 370 | m_Mode: 4 371 | m_Arguments: 372 | m_ObjectArgument: {fileID: 0} 373 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 374 | m_IntArgument: 0 375 | m_FloatArgument: 0 376 | m_StringArgument: 377 | m_BoolArgument: 0 378 | m_CallState: 2 379 | complexEvent: 380 | m_PersistentCalls: 381 | m_Calls: 382 | - m_Target: {fileID: 11400000, guid: cc983a93ea95dc6479e7fb676c693775, type: 2} 383 | m_MethodName: DoTest 384 | m_Mode: 1 385 | m_Arguments: 386 | m_ObjectArgument: {fileID: 0} 387 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 388 | m_IntArgument: 0 389 | m_FloatArgument: 0 390 | m_StringArgument: 391 | m_BoolArgument: 0 392 | m_CallState: 2 393 | soTest: {fileID: 11400000, guid: cc983a93ea95dc6479e7fb676c693775, type: 2} 394 | --- !u!23 &717110255 395 | MeshRenderer: 396 | m_ObjectHideFlags: 0 397 | m_CorrespondingSourceObject: {fileID: 0} 398 | m_PrefabInstance: {fileID: 0} 399 | m_PrefabAsset: {fileID: 0} 400 | m_GameObject: {fileID: 717110253} 401 | m_Enabled: 1 402 | m_CastShadows: 1 403 | m_ReceiveShadows: 1 404 | m_DynamicOccludee: 1 405 | m_MotionVectors: 1 406 | m_LightProbeUsage: 1 407 | m_ReflectionProbeUsage: 1 408 | m_RayTracingMode: 2 409 | m_RenderingLayerMask: 1 410 | m_RendererPriority: 0 411 | m_Materials: 412 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 413 | m_StaticBatchInfo: 414 | firstSubMesh: 0 415 | subMeshCount: 0 416 | m_StaticBatchRoot: {fileID: 0} 417 | m_ProbeAnchor: {fileID: 0} 418 | m_LightProbeVolumeOverride: {fileID: 0} 419 | m_ScaleInLightmap: 1 420 | m_ReceiveGI: 1 421 | m_PreserveUVs: 1 422 | m_IgnoreNormalsForChartDetection: 0 423 | m_ImportantGI: 0 424 | m_StitchLightmapSeams: 0 425 | m_SelectedEditorRenderState: 3 426 | m_MinimumChartSize: 4 427 | m_AutoUVMaxDistance: 0.5 428 | m_AutoUVMaxAngle: 89 429 | m_LightmapParameters: {fileID: 0} 430 | m_SortingLayerID: 0 431 | m_SortingLayer: 0 432 | m_SortingOrder: 0 433 | --- !u!135 &717110256 434 | SphereCollider: 435 | m_ObjectHideFlags: 0 436 | m_CorrespondingSourceObject: {fileID: 0} 437 | m_PrefabInstance: {fileID: 0} 438 | m_PrefabAsset: {fileID: 0} 439 | m_GameObject: {fileID: 717110253} 440 | m_Material: {fileID: 0} 441 | m_IsTrigger: 0 442 | m_Enabled: 1 443 | serializedVersion: 2 444 | m_Radius: 0.5 445 | m_Center: {x: 0, y: 0, z: 0} 446 | --- !u!33 &717110257 447 | MeshFilter: 448 | m_ObjectHideFlags: 0 449 | m_CorrespondingSourceObject: {fileID: 0} 450 | m_PrefabInstance: {fileID: 0} 451 | m_PrefabAsset: {fileID: 0} 452 | m_GameObject: {fileID: 717110253} 453 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 454 | --- !u!4 &717110258 455 | Transform: 456 | m_ObjectHideFlags: 0 457 | m_CorrespondingSourceObject: {fileID: 0} 458 | m_PrefabInstance: {fileID: 0} 459 | m_PrefabAsset: {fileID: 0} 460 | m_GameObject: {fileID: 717110253} 461 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 462 | m_LocalPosition: {x: -3.27, y: -1.3236184, z: 3.59} 463 | m_LocalScale: {x: 1, y: 1, z: 1} 464 | m_Children: [] 465 | m_Father: {fileID: 0} 466 | m_RootOrder: 5 467 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 468 | --- !u!114 &717110259 469 | MonoBehaviour: 470 | m_ObjectHideFlags: 0 471 | m_CorrespondingSourceObject: {fileID: 0} 472 | m_PrefabInstance: {fileID: 0} 473 | m_PrefabAsset: {fileID: 0} 474 | m_GameObject: {fileID: 717110253} 475 | m_Enabled: 1 476 | m_EditorHideFlags: 0 477 | m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} 478 | m_Name: 479 | m_EditorClassIdentifier: 480 | m_Delegates: 481 | - eventID: 4 482 | callback: 483 | m_PersistentCalls: 484 | m_Calls: 485 | - m_Target: {fileID: 717110254} 486 | m_MethodName: TriggerSimpleEvent 487 | m_Mode: 1 488 | m_Arguments: 489 | m_ObjectArgument: {fileID: 0} 490 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 491 | m_IntArgument: 0 492 | m_FloatArgument: 0 493 | m_StringArgument: 494 | m_BoolArgument: 0 495 | m_CallState: 2 496 | --- !u!1 &1058832121 497 | GameObject: 498 | m_ObjectHideFlags: 0 499 | m_CorrespondingSourceObject: {fileID: 0} 500 | m_PrefabInstance: {fileID: 0} 501 | m_PrefabAsset: {fileID: 0} 502 | serializedVersion: 6 503 | m_Component: 504 | - component: {fileID: 1058832122} 505 | - component: {fileID: 1058832124} 506 | - component: {fileID: 1058832123} 507 | m_Layer: 5 508 | m_Name: Text 509 | m_TagString: Untagged 510 | m_Icon: {fileID: 0} 511 | m_NavMeshLayer: 0 512 | m_StaticEditorFlags: 0 513 | m_IsActive: 1 514 | --- !u!224 &1058832122 515 | RectTransform: 516 | m_ObjectHideFlags: 0 517 | m_CorrespondingSourceObject: {fileID: 0} 518 | m_PrefabInstance: {fileID: 0} 519 | m_PrefabAsset: {fileID: 0} 520 | m_GameObject: {fileID: 1058832121} 521 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 522 | m_LocalPosition: {x: 0, y: 0, z: 0} 523 | m_LocalScale: {x: 1, y: 1, z: 1} 524 | m_Children: [] 525 | m_Father: {fileID: 1688619941} 526 | m_RootOrder: 0 527 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 528 | m_AnchorMin: {x: 0, y: 0} 529 | m_AnchorMax: {x: 1, y: 1} 530 | m_AnchoredPosition: {x: 0, y: 0} 531 | m_SizeDelta: {x: 0, y: 0} 532 | m_Pivot: {x: 0.5, y: 0.5} 533 | --- !u!114 &1058832123 534 | MonoBehaviour: 535 | m_ObjectHideFlags: 0 536 | m_CorrespondingSourceObject: {fileID: 0} 537 | m_PrefabInstance: {fileID: 0} 538 | m_PrefabAsset: {fileID: 0} 539 | m_GameObject: {fileID: 1058832121} 540 | m_Enabled: 1 541 | m_EditorHideFlags: 0 542 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 543 | m_Name: 544 | m_EditorClassIdentifier: 545 | m_Material: {fileID: 0} 546 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 547 | m_RaycastTarget: 1 548 | m_OnCullStateChanged: 549 | m_PersistentCalls: 550 | m_Calls: [] 551 | m_FontData: 552 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 553 | m_FontSize: 14 554 | m_FontStyle: 0 555 | m_BestFit: 0 556 | m_MinSize: 10 557 | m_MaxSize: 40 558 | m_Alignment: 4 559 | m_AlignByGeometry: 0 560 | m_RichText: 1 561 | m_HorizontalOverflow: 0 562 | m_VerticalOverflow: 0 563 | m_LineSpacing: 1 564 | m_Text: Button 565 | --- !u!222 &1058832124 566 | CanvasRenderer: 567 | m_ObjectHideFlags: 0 568 | m_CorrespondingSourceObject: {fileID: 0} 569 | m_PrefabInstance: {fileID: 0} 570 | m_PrefabAsset: {fileID: 0} 571 | m_GameObject: {fileID: 1058832121} 572 | m_CullTransparentMesh: 0 573 | --- !u!1 &1108817885 574 | GameObject: 575 | m_ObjectHideFlags: 0 576 | m_CorrespondingSourceObject: {fileID: 0} 577 | m_PrefabInstance: {fileID: 0} 578 | m_PrefabAsset: {fileID: 0} 579 | serializedVersion: 6 580 | m_Component: 581 | - component: {fileID: 1108817888} 582 | - component: {fileID: 1108817887} 583 | - component: {fileID: 1108817886} 584 | m_Layer: 0 585 | m_Name: EventSystem 586 | m_TagString: Untagged 587 | m_Icon: {fileID: 0} 588 | m_NavMeshLayer: 0 589 | m_StaticEditorFlags: 0 590 | m_IsActive: 1 591 | --- !u!114 &1108817886 592 | MonoBehaviour: 593 | m_ObjectHideFlags: 0 594 | m_CorrespondingSourceObject: {fileID: 0} 595 | m_PrefabInstance: {fileID: 0} 596 | m_PrefabAsset: {fileID: 0} 597 | m_GameObject: {fileID: 1108817885} 598 | m_Enabled: 1 599 | m_EditorHideFlags: 0 600 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 601 | m_Name: 602 | m_EditorClassIdentifier: 603 | m_HorizontalAxis: Horizontal 604 | m_VerticalAxis: Vertical 605 | m_SubmitButton: Submit 606 | m_CancelButton: Cancel 607 | m_InputActionsPerSecond: 10 608 | m_RepeatDelay: 0.5 609 | m_ForceModuleActive: 0 610 | --- !u!114 &1108817887 611 | MonoBehaviour: 612 | m_ObjectHideFlags: 0 613 | m_CorrespondingSourceObject: {fileID: 0} 614 | m_PrefabInstance: {fileID: 0} 615 | m_PrefabAsset: {fileID: 0} 616 | m_GameObject: {fileID: 1108817885} 617 | m_Enabled: 1 618 | m_EditorHideFlags: 0 619 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 620 | m_Name: 621 | m_EditorClassIdentifier: 622 | m_FirstSelected: {fileID: 0} 623 | m_sendNavigationEvents: 1 624 | m_DragThreshold: 5 625 | --- !u!4 &1108817888 626 | Transform: 627 | m_ObjectHideFlags: 0 628 | m_CorrespondingSourceObject: {fileID: 0} 629 | m_PrefabInstance: {fileID: 0} 630 | m_PrefabAsset: {fileID: 0} 631 | m_GameObject: {fileID: 1108817885} 632 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 633 | m_LocalPosition: {x: 0, y: 0, z: 0} 634 | m_LocalScale: {x: 1, y: 1, z: 1} 635 | m_Children: [] 636 | m_Father: {fileID: 0} 637 | m_RootOrder: 2 638 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 639 | --- !u!1 &1143639852 640 | GameObject: 641 | m_ObjectHideFlags: 0 642 | m_CorrespondingSourceObject: {fileID: 0} 643 | m_PrefabInstance: {fileID: 0} 644 | m_PrefabAsset: {fileID: 0} 645 | serializedVersion: 6 646 | m_Component: 647 | - component: {fileID: 1143639854} 648 | - component: {fileID: 1143639853} 649 | m_Layer: 0 650 | m_Name: Directional Light 651 | m_TagString: Untagged 652 | m_Icon: {fileID: 0} 653 | m_NavMeshLayer: 0 654 | m_StaticEditorFlags: 0 655 | m_IsActive: 1 656 | --- !u!108 &1143639853 657 | Light: 658 | m_ObjectHideFlags: 0 659 | m_CorrespondingSourceObject: {fileID: 0} 660 | m_PrefabInstance: {fileID: 0} 661 | m_PrefabAsset: {fileID: 0} 662 | m_GameObject: {fileID: 1143639852} 663 | m_Enabled: 1 664 | serializedVersion: 10 665 | m_Type: 1 666 | m_Shape: 0 667 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 668 | m_Intensity: 1 669 | m_Range: 10 670 | m_SpotAngle: 30 671 | m_InnerSpotAngle: 21.80208 672 | m_CookieSize: 10 673 | m_Shadows: 674 | m_Type: 2 675 | m_Resolution: -1 676 | m_CustomResolution: -1 677 | m_Strength: 1 678 | m_Bias: 0.05 679 | m_NormalBias: 0.4 680 | m_NearPlane: 0.2 681 | m_CullingMatrixOverride: 682 | e00: 1 683 | e01: 0 684 | e02: 0 685 | e03: 0 686 | e10: 0 687 | e11: 1 688 | e12: 0 689 | e13: 0 690 | e20: 0 691 | e21: 0 692 | e22: 1 693 | e23: 0 694 | e30: 0 695 | e31: 0 696 | e32: 0 697 | e33: 1 698 | m_UseCullingMatrixOverride: 0 699 | m_Cookie: {fileID: 0} 700 | m_DrawHalo: 0 701 | m_Flare: {fileID: 0} 702 | m_RenderMode: 0 703 | m_CullingMask: 704 | serializedVersion: 2 705 | m_Bits: 4294967295 706 | m_RenderingLayerMask: 1 707 | m_Lightmapping: 4 708 | m_LightShadowCasterMode: 0 709 | m_AreaSize: {x: 1, y: 1} 710 | m_BounceIntensity: 1 711 | m_ColorTemperature: 6570 712 | m_UseColorTemperature: 0 713 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 714 | m_UseBoundingSphereOverride: 0 715 | m_ShadowRadius: 0 716 | m_ShadowAngle: 0 717 | --- !u!4 &1143639854 718 | Transform: 719 | m_ObjectHideFlags: 0 720 | m_CorrespondingSourceObject: {fileID: 0} 721 | m_PrefabInstance: {fileID: 0} 722 | m_PrefabAsset: {fileID: 0} 723 | m_GameObject: {fileID: 1143639852} 724 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 725 | m_LocalPosition: {x: 0, y: 3, z: 0} 726 | m_LocalScale: {x: 1, y: 1, z: 1} 727 | m_Children: [] 728 | m_Father: {fileID: 0} 729 | m_RootOrder: 1 730 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 731 | --- !u!1 &1605314330 732 | GameObject: 733 | m_ObjectHideFlags: 0 734 | m_CorrespondingSourceObject: {fileID: 0} 735 | m_PrefabInstance: {fileID: 0} 736 | m_PrefabAsset: {fileID: 0} 737 | serializedVersion: 6 738 | m_Component: 739 | - component: {fileID: 1605314335} 740 | - component: {fileID: 1605314334} 741 | - component: {fileID: 1605314333} 742 | - component: {fileID: 1605314332} 743 | - component: {fileID: 1605314331} 744 | m_Layer: 0 745 | m_Name: TriggerEvent 746 | m_TagString: Untagged 747 | m_Icon: {fileID: 0} 748 | m_NavMeshLayer: 0 749 | m_StaticEditorFlags: 0 750 | m_IsActive: 1 751 | --- !u!114 &1605314331 752 | MonoBehaviour: 753 | m_ObjectHideFlags: 0 754 | m_CorrespondingSourceObject: {fileID: 0} 755 | m_PrefabInstance: {fileID: 0} 756 | m_PrefabAsset: {fileID: 0} 757 | m_GameObject: {fileID: 1605314330} 758 | m_Enabled: 1 759 | m_EditorHideFlags: 0 760 | m_Script: {fileID: 11500000, guid: d0b148fe25e99eb48b9724523833bab1, type: 3} 761 | m_Name: 762 | m_EditorClassIdentifier: 763 | m_Delegates: 764 | - eventID: 0 765 | callback: 766 | m_PersistentCalls: 767 | m_Calls: 768 | - m_Target: {fileID: 11400000, guid: cc983a93ea95dc6479e7fb676c693775, type: 2} 769 | m_MethodName: DoTest 770 | m_Mode: 1 771 | m_Arguments: 772 | m_ObjectArgument: {fileID: 0} 773 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 774 | m_IntArgument: 0 775 | m_FloatArgument: 5 776 | m_StringArgument: 777 | m_BoolArgument: 0 778 | m_CallState: 2 779 | --- !u!23 &1605314332 780 | MeshRenderer: 781 | m_ObjectHideFlags: 0 782 | m_CorrespondingSourceObject: {fileID: 0} 783 | m_PrefabInstance: {fileID: 0} 784 | m_PrefabAsset: {fileID: 0} 785 | m_GameObject: {fileID: 1605314330} 786 | m_Enabled: 1 787 | m_CastShadows: 1 788 | m_ReceiveShadows: 1 789 | m_DynamicOccludee: 1 790 | m_MotionVectors: 1 791 | m_LightProbeUsage: 1 792 | m_ReflectionProbeUsage: 1 793 | m_RayTracingMode: 2 794 | m_RenderingLayerMask: 1 795 | m_RendererPriority: 0 796 | m_Materials: 797 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 798 | m_StaticBatchInfo: 799 | firstSubMesh: 0 800 | subMeshCount: 0 801 | m_StaticBatchRoot: {fileID: 0} 802 | m_ProbeAnchor: {fileID: 0} 803 | m_LightProbeVolumeOverride: {fileID: 0} 804 | m_ScaleInLightmap: 1 805 | m_ReceiveGI: 1 806 | m_PreserveUVs: 1 807 | m_IgnoreNormalsForChartDetection: 0 808 | m_ImportantGI: 0 809 | m_StitchLightmapSeams: 0 810 | m_SelectedEditorRenderState: 3 811 | m_MinimumChartSize: 4 812 | m_AutoUVMaxDistance: 0.5 813 | m_AutoUVMaxAngle: 89 814 | m_LightmapParameters: {fileID: 0} 815 | m_SortingLayerID: 0 816 | m_SortingLayer: 0 817 | m_SortingOrder: 0 818 | --- !u!65 &1605314333 819 | BoxCollider: 820 | m_ObjectHideFlags: 0 821 | m_CorrespondingSourceObject: {fileID: 0} 822 | m_PrefabInstance: {fileID: 0} 823 | m_PrefabAsset: {fileID: 0} 824 | m_GameObject: {fileID: 1605314330} 825 | m_Material: {fileID: 0} 826 | m_IsTrigger: 0 827 | m_Enabled: 1 828 | serializedVersion: 2 829 | m_Size: {x: 1, y: 1, z: 1} 830 | m_Center: {x: 0, y: 0, z: 0} 831 | --- !u!33 &1605314334 832 | MeshFilter: 833 | m_ObjectHideFlags: 0 834 | m_CorrespondingSourceObject: {fileID: 0} 835 | m_PrefabInstance: {fileID: 0} 836 | m_PrefabAsset: {fileID: 0} 837 | m_GameObject: {fileID: 1605314330} 838 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 839 | --- !u!4 &1605314335 840 | Transform: 841 | m_ObjectHideFlags: 0 842 | m_CorrespondingSourceObject: {fileID: 0} 843 | m_PrefabInstance: {fileID: 0} 844 | m_PrefabAsset: {fileID: 0} 845 | m_GameObject: {fileID: 1605314330} 846 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 847 | m_LocalPosition: {x: 1.8084306, y: -1.3236184, z: 4.8815436} 848 | m_LocalScale: {x: 1, y: 1, z: 1} 849 | m_Children: [] 850 | m_Father: {fileID: 0} 851 | m_RootOrder: 4 852 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 853 | --- !u!1 &1688619940 854 | GameObject: 855 | m_ObjectHideFlags: 0 856 | m_CorrespondingSourceObject: {fileID: 0} 857 | m_PrefabInstance: {fileID: 0} 858 | m_PrefabAsset: {fileID: 0} 859 | serializedVersion: 6 860 | m_Component: 861 | - component: {fileID: 1688619941} 862 | - component: {fileID: 1688619944} 863 | - component: {fileID: 1688619943} 864 | - component: {fileID: 1688619942} 865 | m_Layer: 5 866 | m_Name: Button 867 | m_TagString: Untagged 868 | m_Icon: {fileID: 0} 869 | m_NavMeshLayer: 0 870 | m_StaticEditorFlags: 0 871 | m_IsActive: 1 872 | --- !u!224 &1688619941 873 | RectTransform: 874 | m_ObjectHideFlags: 0 875 | m_CorrespondingSourceObject: {fileID: 0} 876 | m_PrefabInstance: {fileID: 0} 877 | m_PrefabAsset: {fileID: 0} 878 | m_GameObject: {fileID: 1688619940} 879 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 880 | m_LocalPosition: {x: 0, y: 0, z: 0} 881 | m_LocalScale: {x: 1, y: 1, z: 1} 882 | m_Children: 883 | - {fileID: 1058832122} 884 | m_Father: {fileID: 283302700} 885 | m_RootOrder: 0 886 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 887 | m_AnchorMin: {x: 0.5, y: 0.5} 888 | m_AnchorMax: {x: 0.5, y: 0.5} 889 | m_AnchoredPosition: {x: -67.5, y: -186} 890 | m_SizeDelta: {x: 160, y: 30} 891 | m_Pivot: {x: 0.5, y: 0.5} 892 | --- !u!114 &1688619942 893 | MonoBehaviour: 894 | m_ObjectHideFlags: 0 895 | m_CorrespondingSourceObject: {fileID: 0} 896 | m_PrefabInstance: {fileID: 0} 897 | m_PrefabAsset: {fileID: 0} 898 | m_GameObject: {fileID: 1688619940} 899 | m_Enabled: 1 900 | m_EditorHideFlags: 0 901 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 902 | m_Name: 903 | m_EditorClassIdentifier: 904 | m_Navigation: 905 | m_Mode: 3 906 | m_SelectOnUp: {fileID: 0} 907 | m_SelectOnDown: {fileID: 0} 908 | m_SelectOnLeft: {fileID: 0} 909 | m_SelectOnRight: {fileID: 0} 910 | m_Transition: 1 911 | m_Colors: 912 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 913 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 914 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 915 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 916 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 917 | m_ColorMultiplier: 1 918 | m_FadeDuration: 0.1 919 | m_SpriteState: 920 | m_HighlightedSprite: {fileID: 0} 921 | m_PressedSprite: {fileID: 0} 922 | m_SelectedSprite: {fileID: 0} 923 | m_DisabledSprite: {fileID: 0} 924 | m_AnimationTriggers: 925 | m_NormalTrigger: Normal 926 | m_HighlightedTrigger: Highlighted 927 | m_PressedTrigger: Pressed 928 | m_SelectedTrigger: Highlighted 929 | m_DisabledTrigger: Disabled 930 | m_Interactable: 1 931 | m_TargetGraphic: {fileID: 1688619943} 932 | m_OnClick: 933 | m_PersistentCalls: 934 | m_Calls: 935 | - m_Target: {fileID: 1605314333} 936 | m_MethodName: set_enabled 937 | m_Mode: 6 938 | m_Arguments: 939 | m_ObjectArgument: {fileID: 0} 940 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 941 | m_IntArgument: 0 942 | m_FloatArgument: 0 943 | m_StringArgument: 944 | m_BoolArgument: 0 945 | m_CallState: 2 946 | --- !u!114 &1688619943 947 | MonoBehaviour: 948 | m_ObjectHideFlags: 0 949 | m_CorrespondingSourceObject: {fileID: 0} 950 | m_PrefabInstance: {fileID: 0} 951 | m_PrefabAsset: {fileID: 0} 952 | m_GameObject: {fileID: 1688619940} 953 | m_Enabled: 1 954 | m_EditorHideFlags: 0 955 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 956 | m_Name: 957 | m_EditorClassIdentifier: 958 | m_Material: {fileID: 0} 959 | m_Color: {r: 1, g: 1, b: 1, a: 1} 960 | m_RaycastTarget: 1 961 | m_OnCullStateChanged: 962 | m_PersistentCalls: 963 | m_Calls: [] 964 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 965 | m_Type: 1 966 | m_PreserveAspect: 0 967 | m_FillCenter: 1 968 | m_FillMethod: 4 969 | m_FillAmount: 1 970 | m_FillClockwise: 1 971 | m_FillOrigin: 0 972 | m_UseSpriteMesh: 0 973 | m_PixelsPerUnitMultiplier: 1 974 | --- !u!222 &1688619944 975 | CanvasRenderer: 976 | m_ObjectHideFlags: 0 977 | m_CorrespondingSourceObject: {fileID: 0} 978 | m_PrefabInstance: {fileID: 0} 979 | m_PrefabAsset: {fileID: 0} 980 | m_GameObject: {fileID: 1688619940} 981 | m_CullTransparentMesh: 0 982 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/EventVisualizerDemo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 580c4cb30d11c9d4bafe5f44d6421224 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/ScriptableObjectEventTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Events; 5 | 6 | [CreateAssetMenuAttribute(menuName = "UnityEventVisualizer/Scriptable Object Test")] 7 | public class ScriptableObjectEventTest : ScriptableObject 8 | { 9 | public UnityEvent OnTest; 10 | 11 | public void DoTest() 12 | { 13 | if(OnTest != null) 14 | { 15 | OnTest.Invoke(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/ScriptableObjectEventTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f508ed9fb109b2744b2aa2846b607faf 3 | timeCreated: 1530463444 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/TestSO.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: f508ed9fb109b2744b2aa2846b607faf, type: 3} 13 | m_Name: TestSO 14 | m_EditorClassIdentifier: 15 | OnTest: 16 | m_PersistentCalls: 17 | m_Calls: [] 18 | -------------------------------------------------------------------------------- /Samples~/GeneralEvents/TestSO.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc983a93ea95dc6479e7fb676c693775 3 | timeCreated: 1530464343 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 11400000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.mefistofiles.unity-event-visualizer", 3 | "version": "1.4.4", 4 | "displayName": "Unity Event Visualizer", 5 | "description": "A graph editor for viewing all UnityEvents at a glance", 6 | "unity": "2017.4", 7 | "unityRelease": "37f1", 8 | "keywords": [ 9 | "unity", 10 | "event", 11 | "visualizer" 12 | ], 13 | "homepage": "https://github.com/MephestoKhaan/UnityEventVisualizer/", 14 | "bugs": { 15 | "url": "https://github.com/MephestoKhaan/UnityEventVisualizer/issues" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "ssh://git@github.com:MephestoKhaan/UnityEventVisualizer.git" 20 | }, 21 | "license": "MIT", 22 | "author": { 23 | "name": "Luca Mefisto", 24 | "email": "luca.m.conesa@gmail.com", 25 | "url": "http://mefistofiles.com/" 26 | }, 27 | "files": [ 28 | "*.md", 29 | "*.meta", 30 | "*.asmdef", 31 | "Samples~", 32 | "Editor" 33 | ], 34 | "samples": [ 35 | { 36 | "displayName": "General Events", 37 | "description": "Sample covering different types of custom and Unity Events", 38 | "path": "Samples~/GeneralEvents" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6da3ed9fdc162914fad734e70ffcf27d 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------