예제 #1
0
 public Region(EntityGraphProjector projector)
 {
     foreach (Coordinate coord in Coordinate.InsideBounds(projector.Bounds))
     {
         AddCoordIfNotProcessed(coord);
     }
 }
예제 #2
0
        protected virtual void OnSceneGUI()
        {
            if (!EGWindow.debugDrawBounds)
            {
                return;
            }
            EntityGraphProjector projector = (EntityGraphProjector)target;

            boundsHandles.center = projector.Bounds.center;
            boundsHandles.size   = projector.Bounds.size;

            EditorGUI.BeginChangeCheck();
            boundsHandles.DrawHandle();
            if (EditorGUI.EndChangeCheck())
            {
                Undo.RecordObject(projector, "Change Bounds");

                projector.Bounds = new Bounds
                {
                    center = boundsHandles.center,
                    size   = boundsHandles.size
                };
                projector.transform.position = boundsHandles.center;
            }
        }
예제 #3
0
 public void SetCurrentProjector(EntityGraphProjector projector) => currentProjector = projector;