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;
            }
        }
    }
Exemple #2
0
    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;
            }
        }
    }