Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[HideInInspector] VS [SerializeField]
public class HideInInspectorCheck : MonoBehaviour {
// [HideInInspector]をつけてInspectorで非表示にする
public int level;
// [HideInInspector]をつけないケース
public string characterName;
// privateに[SerializeField]をつけて表示させる
int hp;
// privateに[SerializeField]をつけない(表示されない)
int mp;
// privateに[SerializeField]と[HideInInspector]の両方をつける
int atk;
// privateに[SerializeField]と[HideInInspector]の両方をつける(上とは逆の順番)
int def;
// イカ、省略
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment