Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active June 12, 2018 09:07
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/786a787199bf27bac6e8a3a4071e8bdd to your computer and use it in GitHub Desktop.
Save todorok1/786a787199bf27bac6e8a3a4071e8bdd to your computer and use it in GitHub Desktop.
シリアライズの確認
// privateに[SerializeField]をつけない(表示されない)
int mp;
// privateに[SerializeField]と[HideInInspector]の両方をつける
[SerializeField][HideInInspector]
int atk;
void Start () {
Debug.Log(characterName + "のmp : " + mp);
Debug.Log(characterName + "のatk : " + atk);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment