Search Unity

Handles.Label - No example in C#

Discussion in 'Documentation' started by Uber6, Jul 6, 2015.

  1. Uber6

    Uber6

    Joined:
    Sep 30, 2013
    Posts:
    25
  2. aleks_unity

    aleks_unity

    Unity tech writer/programmer

    Joined:
    Jan 12, 2012
    Posts:
    25
    Thank you for reporting this. We have made a bug and it will be addressed.
     
  3. Uber6

    Uber6

    Joined:
    Sep 30, 2013
    Posts:
    25
    What I ended up doing is this (in a MonoBehaviour derived script, not Editor derived):

    Code (CSharp):
    1. #if UNITY_EDITOR
    2. void OnDrawGizmos()
    3. {
    4.      Handles.Label(transform.position, myString);
    5. }
    6. #endif
     
    Last edited: Jul 7, 2015