Answers for "unity inspector draw line"

C#
2

unity drawline

public Transform target;

    void OnDrawGizmosSelected()
    {
        if (target != null)
        {
            // Draws a blue line from this transform to the target
            Gizmos.color = Color.blue;
            Gizmos.DrawLine(transform.position, target.position);
        }
    }
Posted by: Guest on February-01-2020
0

unity inspector draw line

//============================================================
   void GuiLine( int i_height = 1 )
   {
       Rect rect = EditorGUILayout.GetControlRect(false, i_height );
       rect.height = i_height;
       EditorGUI.DrawRect(rect, new Color ( 0.5f,0.5f,0.5f, 1 ) );
   }
Posted by: Guest on September-22-2021

Code answers related to "unity inspector draw line"

C# Answers by Framework

Browse Popular Code Answers by Language