private void CreateShotter() { if (screenshotter == null){ MultiScreenshot existingShotter = FindObjectOfType<MultiScreenshot>(); if (existingShotter == null){ GameObject go = Instantiate(Resources.Load("_MultiScreenshot", typeof(GameObject))) as GameObject; screenshotter = go.GetComponent<MultiScreenshot>(); DontDestroyOnLoad(screenshotter); }else{ screenshotter = existingShotter; } } }
private void CreateShotter() { if (screenshotter == null) { MultiScreenshot existingShotter = FindObjectOfType <MultiScreenshot>(); if (existingShotter == null) { GameObject go = Instantiate(Resources.Load("_MultiScreenshot", typeof(GameObject))) as GameObject; screenshotter = go.GetComponent <MultiScreenshot>(); DontDestroyOnLoad(screenshotter); } else { screenshotter = existingShotter; } } }