after instantiated a prefab (with network instantiated…) i note that when i close program prefab mantain old value in editor and these remain valid in next execution.
I need that my prefam have only the original value that i put into it.
I must create a function to initialize it?
This is the way things are supposed to work – restarting the game restarts everything fresh. Prefabs in general never change, not even when the game runs. For example, you might spawn 6 copies of the prefab, and change values in the copies.
If you want the game to “remember” values in between plays, you need a save system. PlayerPrefs is an easy way to do that. Yes, you will need to initialize by reading saved data and copying to the player, etc… stats. Or each time you spawn a prefab, do that.