Здравствуйте!
Добавил в игру скриншот, решил протестировать. Забилдил через XCode, в логах ошибка - "FileNotFoundException: Could not find file". Извечный вопрос: почему?
private IEnumerator TakeScreenshot()
{
string imageName = "LevelFinished" + current_level.ToString() + ".png";
ScreenCapture.CaptureScreenshot(Application.persistentDataPath + "/" + imageName);
yield return new WaitForSeconds(0.3f);
byte[] data = File.ReadAllBytes(Application.persistentDataPath + "/" + imageName);
Texture2D screenshotTexture = new Texture2D(Screen.width, Screen.height);
screenshotTexture.LoadImage(data);
Sprite screenshotSprite = Sprite.Create(screenshotTexture, new Rect(0, 0, Screen.width, Screen.height), new Vector2(0.5f, 0.5f));
UI_Image_final.transform.GetChild(0).GetComponent<Image>().sprite = screenshotSprite;
}