CS0106: The modifier 'public' is not valid for this item code example
Example: unity error CS0106: The modifier 'public' is not valid for this item
The problem can be that you have put your method in the Start or Update method.
The problem can be that you have put your method in the Start or Update method.