-
-
Save todorok1/911d9a18f4ef97769a832a2895e036ee to your computer and use it in GitHub Desktop.
Debug.Logで出力するメッセージに色をつけるサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start() | |
{ | |
OutputColorMessage("magenta", "ピンクで表示する"); | |
OutputColorMessage("yellow", "黄色もあるよ"); | |
OutputColorMessage("cyan", "今度は水色に"); | |
} | |
/// <Summary> | |
/// 引数で指定した色でメッセージを表示します。 | |
/// </Summary> | |
void OutputColorMessage(string color, string msg) | |
{ | |
Debug.Log($"<color={color}>{msg}</color>"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment