I have got a Gameobject with a script as shows on it.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameDataCarrier:MonoBehaviour{
publicGameDatagameData;
voidAwake(){
DontDestroyOnLoad(gameObject);
}
}
When i load the game scene the Gameobject is fine it dose not get destroyed, but when i go back to the main menu level this gameObject gets duplicated and now there is 2 and each time it makes 1 more.
It didn’t do this before this version went out.
Can you help ?