Example #1
0
        private void OnDrawGizmos()
        {
            Gizmos.color = Color.green.GetWithAlpha(0.01f);
            GizmosExtensions.DrawOutlinedCube(GetBounds());

            OnDrawGizmosInternal();
        }
Example #2
0
        private void OnDrawGizmos()
        {
            Gizmos.color = Color.blue.GetWithAlpha(0.05f);
            GizmosExtensions.DrawOutlinedCube(GetBounds());

            Gizmos.color = Color.black;
            GizmosExtensions.DrawArearGrid(GetRect(), cell_size);
        }
Example #3
0
 static public void DrawSprite(Vector3 center, float size, Sprite sprite)
 {
     GizmosExtensions.DrawSprite(
         center,
         new Vector2(size, sprite.GetAspect() * size),
         sprite
         );
 }
Example #4
0
 static public void DrawTexture(Vector3 position, float size, Texture2D texture)
 {
     GizmosExtensions.DrawTexture(
         position,
         new Vector2(size, texture.GetAspect() * size),
         texture
         );
 }
Example #5
0
        static public void DrawPath(IEnumerable <Vector3> path, float point_size = 0.0f)
        {
            path.ProcessConnections((v1, v2) => Gizmos.DrawLine(v1, v2));

            if (point_size > 0.0f)
            {
                path.Process(v => GizmosExtensions.DrawPoint(v, point_size));
            }
        }
Example #6
0
 static public void DrawCircle(Vector3 center, float radius)
 {
     GizmosExtensions.UseMatrix(
         Matrix4x4.TRS(
             center,
             Quaternion.identity,
             new Vector3(radius, radius, radius) * 2.0f
             ),
         () => Gizmos.DrawMesh(MeshExtensions.CreateCircle(32))
         );
 }
Example #7
0
 static public void DrawDegreeSector(float start_angle, float end_angle, Vector3 center, float radius)
 {
     GizmosExtensions.UseMatrix(
         Matrix4x4.TRS(
             center,
             Quaternion.identity,
             new Vector3(radius, radius, radius) * 2.0f
             ),
         () => Gizmos.DrawMesh(MeshExtensions.CreateDegreeSector(start_angle, end_angle, 32))
         );
 }
Example #8
0
        private void OnDrawGizmos()
        {
            Gizmos.color = Color.yellow;

            GizmosExtensions.DrawWireCube(GetRect());
        }
Example #9
0
 private void OnDrawGizmos()
 {
     Gizmos.color = Color.cyan.GetWithAlpha(0.01f);
     GizmosExtensions.DrawOutlinedCube(bounds);
 }
Example #10
0
 static public void DrawSprite(Vector3 center, Sprite sprite)
 {
     GizmosExtensions.DrawSprite(center, sprite.GetWorldSize(), sprite);
 }
Example #11
0
 static public void DrawSprite(Vector3 center, Vector2 size, Sprite sprite)
 {
     GizmosExtensions.DrawTexture(center, size, sprite.Sideload());
 }
Example #12
0
 private void OnDrawGizmos()
 {
     Gizmos.color = Color.red;
     targets.Process(t => GizmosExtensions.DrawPoint(t.GetSpacarPosition()));
 }