Browse Source

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
master
Steve Halliwell 5 years ago
parent
commit
a3131671ef
  1. 5
      Assets/Fungus/Scripts/Editor/ViewEditor.cs

5
Assets/Fungus/Scripts/Editor/ViewEditor.cs

@ -22,10 +22,9 @@ namespace Fungus.EditorUtils
#else #else
[DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy, typeof(View))] [DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy, typeof(View))]
#endif #endif
static void RenderCustomGizmo(Transform objectTransform, GizmoType gizmoType) public static void RenderCustomGizmo(View view, GizmoType gizmoType)
{ {
View view = objectTransform.gameObject.GetComponent<View>(); DrawView(view, false);
DrawView(view, false);
} }
protected virtual Vector2 LookupAspectRatio(int index) protected virtual Vector2 LookupAspectRatio(int index)

Loading…
Cancel
Save