はじめに
「Unity3d Runtime Debug Draw」を Unity プロジェクトに導入することで
Scene ビューや Game ビューにデバッグ用のテキストを表示できるようになります
使用例
使い方
using RuntimeDebugDraw; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { Draw.AttachText ( transform : transform, strFunc : () => { return string.Format ( "( {0}, {1} )", transform.position.x.ToString( "0.0" ), transform.position.y.ToString( "0.0" ) ); }, offset : Vector3.up, color : Color.red, size : 24 ); } }
上記のようなコードを記述することで使用できます