public void OnSceneGUI() { DebugLabel debug = (DebugLabel)this.target; GameObject go = debug.gameObject; Handles.color = Color.blue; Handles.Label(go.transform.position + new Vector3(0, 0, 2.3f), debug.GetMessage()); }
public static DebugLabel Create(Vector3 position, string text) { Window_Pointer pointerUI = TagResolver.i.gameManager.pointerUI; Transform damagePopupTransform = Instantiate(GameAssets.i.pfDebugLabel, position, Quaternion.identity); DebugLabel damagePopup = damagePopupTransform.GetComponent <DebugLabel>(); damagePopup.SetText(text); damagePopup.transform.SetParent(pointerUI.transform); return(damagePopup); }
void Awake() { instance = this; }