public void startPostingMinigame() { if (captionManager == null) { captionManager = GameObject.Find("CaptionManager").GetComponent <CaptionSelectManager>(); } if (photoManager == null) { photoManager = GameObject.Find("Photo").GetComponent <PhotoMaterialsManager>(); } if (postImages == null) { Debug.Log("Something bad happened!!!"); return; } int imagesLen = postImages.images.Length; int index = Random.Range(0, imagesLen); currImage = postImages.images[index]; photoManager.setImage(getImage(currImage.imagePath)); photoManager.SetFilters(currImage.filters); captionManager.SetCaptions(currImage.captions); }
// Start is called before the first frame update void Start() { gameManager = GameObject.Find("GameManager").GetComponent <GameManager>(); captionManager = GameObject.Find("CaptionManager").GetComponent <CaptionSelectManager>(); photoManager = GameObject.Find("Photo").GetComponent <PhotoMaterialsManager>(); }