So I want to change the value of the stats of enemies of some type mid game, but when I change the value of the prefab mid game, it stays changed even when I stop the game. The new value stays on the editor…
Here is the simple code I used to change it:
public class EnemyStateChanger : MonoBehaviour
{
[SerializeField] Enemy normalParrot;
[SerializeField] Enemy bigParrot;
[SerializeField] Enemy fastParrot;
[SerializeField] Enemy fluffCannon;
private void Update()
{
if (ScoreManager.getScore() > 2)
fluffCannon.setSpawnLimit(2);
}
}