Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created July 16, 2018 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/905748410eb8048eb74666d1f1ab52f5 to your computer and use it in GitHub Desktop.
Save todorok1/905748410eb8048eb74666d1f1ab52f5 to your computer and use it in GitHub Desktop.
ToolTipを使ってフィールドの使い方を表示してみよう。
public class ToolTipCheck : MonoBehaviour {
[Tooltip("これはキャラクターの最大HPです。")]
public int maxHp = 255;
[Tooltip("こっちはキャラクターの現在のHP。\n最大HPを超えることがあったら報告ください。")]
public int hp = 255;
const int statusMax = 255;
[Tooltip("これはキャラクターの攻撃力です。最大値の255を超えないことを確認してください。")][Range(1, statusMax)]
public int atk = 168;
[Tooltip("キャラクターの防御力でち。")][Range(1, statusMax)]
public int def = 58;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment