void Awake() { traceMainCamera = this; DontDestroyOnLoad(gameObject); }
void OnEnable() { rt = Resources.Load <Texture>("Textures/lightMap"); //tm = GameObject.FindObjectOfType<TraceMainCamera>(); tm = Resources.Load <GameObject> ("levelPublic/lightMapCamera").GetComponent <TraceMainCamera> (); }