Search Unity

Reloading the scene vs. Instantiating player gameobject

Discussion in '2D' started by oguzhanes98, Aug 4, 2019.

  1. oguzhanes98

    oguzhanes98

    Joined:
    Feb 20, 2018
    Posts:
    4
    I'm making a platformer, rage inducing game in which the player could die every 5 seconds or so. Right now I'm reloading the scene everytime the player dies but it causes huge spikes in the CPU usage because of A* pathfinding. I have 5 gameobjects in the scene that uses A* pathfinding and they are enabled when the player lands on a platform. Ekran Görüntüsü (56).png
    Now what I'm wondering is, in a game like this, would it be more CPU friendly to instantiate the player object after the player dies, or would it not make a noticable difference?