difference between public and serializefield unity code example
Example: difference between public and serializefield unity
•Serialisable fields show up in the inspector.
Here are the four different possible combinations:
public //Show up in inspector and accessible by other scripts
[SerialiseField] //Show up in inspector, not accessible by other scripts
[HideInInspector] //Doesn't show in inspector, accessible by other scripts
private //Doesn't show in inspector, not accessible by other scripts