About Unity3D function in SerialField of this Attribute

First we look at the results, the following is the content of the source file:

Then the corresponding panel:

We must pay attention to this fact:

As can be seen, publicthe default can be modified in the panel, the corresponding set privateof isCreateSoldierbut will not appear in the panel, and the same is private, but there are [SerializeField]variables can be modified in the panel.

In short probably know that it wants to show off usage, detailed explanation quoted from someone else's conclusion:

reference

In use Unity3D [SerializeField] Characteristics

Guess you like

Origin www.cnblogs.com/yejianying/p/u3d_SerializeField.html