How to initialize private variables?

for public variables,we can intial them in the inspector panel,but i wonder how can i assign value to a private variable instead of hard coded ?

1 Answer

1

You can use the SerializeField attribute for this. Adding this attribute to the field will cause it to appear in the inspector.