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
1You can use the SerializeField attribute for this. Adding this attribute to the field will cause it to appear in the inspector.