From a3131671efac358c592c4bb6fd24a2929ef8709b Mon Sep 17 00:00:00 2001 From: Steve Halliwell Date: Sat, 11 Jul 2020 08:19:49 +1000 Subject: [PATCH] Fix ViewEditor Gizmo param Type By setting the type in the attribute info Unity expects the param to be of matching type rather than common unity component --- Assets/Fungus/Scripts/Editor/ViewEditor.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/Fungus/Scripts/Editor/ViewEditor.cs b/Assets/Fungus/Scripts/Editor/ViewEditor.cs index db4da11f..127465ef 100644 --- a/Assets/Fungus/Scripts/Editor/ViewEditor.cs +++ b/Assets/Fungus/Scripts/Editor/ViewEditor.cs @@ -22,10 +22,9 @@ namespace Fungus.EditorUtils #else [DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy, typeof(View))] #endif - static void RenderCustomGizmo(Transform objectTransform, GizmoType gizmoType) + public static void RenderCustomGizmo(View view, GizmoType gizmoType) { - View view = objectTransform.gameObject.GetComponent(); - DrawView(view, false); + DrawView(view, false); } protected virtual Vector2 LookupAspectRatio(int index)