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

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

            Gizmos.color = Color.black;
            GizmosExtensions.DrawArearGrid(GetRect(), cell_size);
        }
コード例 #3
0
 static public void DrawSprite(Vector3 center, float size, Sprite sprite)
 {
     GizmosExtensions.DrawSprite(
         center,
         new Vector2(size, sprite.GetAspect() * size),
         sprite
         );
 }
コード例 #4
0
 static public void DrawTexture(Vector3 position, float size, Texture2D texture)
 {
     GizmosExtensions.DrawTexture(
         position,
         new Vector2(size, texture.GetAspect() * size),
         texture
         );
 }
コード例 #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));
            }
        }
コード例 #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))
         );
 }
コード例 #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))
         );
 }
コード例 #8
0
        private void OnDrawGizmos()
        {
            Gizmos.color = Color.yellow;

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