📜  public 和 serializefield unity 之间的区别 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:17.493000             🧑  作者: Mango

代码示例1
•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