Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created June 13, 2018 03:48
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/2fcd76c147e9ca637170a3af00e22024 to your computer and use it in GitHub Desktop.
Save todorok1/2fcd76c147e9ca637170a3af00e22024 to your computer and use it in GitHub Desktop.
SerializeFieldとNonSerializedの頂上バトル
// [System.NonSerialized]をつけてInspectorで非表示にする
[System.NonSerialized]
public int level = 630;
// [System.NonSerialized]をつけないケース
public string characterName = "FamiliMart";
void Start () {
Debug.Log("level : " + level);
Debug.Log("characterName : " + characterName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment