Exemple #1
0
 public Region(EntityGraphProjector projector)
 {
     foreach (Coordinate coord in Coordinate.InsideBounds(projector.Bounds))
     {
         AddCoordIfNotProcessed(coord);
     }
 }
Exemple #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;
            }
        }
 public void SetCurrentProjector(EntityGraphProjector projector) => currentProjector = projector;