Browse Source

Fixed massive editor slowdown when there is MANY objects in the scene

master
Daniel Borges 4 years ago
parent
commit
fc9ebdb444
  1. 11
      Assets/Fungus/Scripts/Editor/ViewEditor.cs

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

@ -18,17 +18,14 @@ namespace Fungus.EditorUtils
// Draw Views when they're not selected
#if UNITY_5_0
[DrawGizmo(GizmoType.NotSelected | GizmoType.SelectedOrChild)]
[DrawGizmo(GizmoType.NotSelected | GizmoType.SelectedOrChild, typeof(View))]
#else
[DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy)]
[DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.InSelectionHierarchy, typeof(View))]
#endif
static void RenderCustomGizmo(Transform objectTransform, GizmoType gizmoType)
{
View view = objectTransform.gameObject.GetComponent<View>();
if (view != null)
{
DrawView(view, false);
}
DrawView(view, false);
}
protected virtual Vector2 LookupAspectRatio(int index)
@ -264,4 +261,4 @@ namespace Fungus.EditorUtils
return view.transform.InverseTransformPoint(view.transform.position + new Vector3(0, view.ViewSize, 0)).magnitude;
}
}
}
}

Loading…
Cancel
Save