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, public
the default can be modified in the panel, the corresponding set private
of isCreateSoldier
but 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: