Last active
April 16, 2020 06:54
-
-
Save smkplus/3af8fd9b3316edcaa68c78d06c1e030f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using UnityEngine; | |
public class SomePerson : MonoBehaviour | |
{ | |
//This field gets serialized because it is public. | |
public string firstName = "John"; | |
//This field does not get serialized because it is private. | |
private int age = 40; | |
//This field gets serialized even though it is private | |
//because it has the SerializeField attribute applied. | |
[SerializeField] | |
private bool hasHealthPotion = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment