Quantcast
Channel: Answers for "Understanding Prefabs + Player Spawn Points"
Viewing all articles
Browse latest Browse all 4

Answer by DoctorWhy

$
0
0
Instantiating an object during the game is fine as far as I know. I beleive Unity handles making sure you don't reload the model every time, but instead just adds a new character to a list of objects. That code you found should work above. I don't know if you want to use it with respawning a character though, but instead resetting the player information (such as health), then moving them to the spawn point. (Unless you are restarting pieces of the level as well). However, spawning a new enemy at a spawn point with that should be perfectly fine. EDIT: Just saw your edit. (That code is Javascript, not C#).

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>