Beispiel #1
0
    /// <summary>
    /// <description> Invokes <see cref="DelayedAttribute"/> after 2 seconds </description>
    /// </summary>
    void Start()
    {
        Invoke("DelayedSetup", 2);
#if (UNITY_ANDROID && !UNITY_EDITOR)
        AndroidCamera = gameObject.GetComponent <AndroidCamera>();
#endif
    }
Beispiel #2
0
 void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
 public void SaveScreenshot()
 {
     AndroidCamera.Instance.OnImageSaved += OnImageSaved;
     AndroidCamera.Instance.SaveScreenshotToGallery("Screenshot" + AndroidCamera.GetRandomString());
 }
 public void SaveToGalalry()
 {
     AndroidCamera.Instance.OnImageSaved += OnImageSaved;
     AndroidCamera.Instance.SaveImageToGallery(helloWorldTexture, "Screenshot" + AndroidCamera.GetRandomString());
 }
Beispiel #5
0
 public void SaveToGalalry(Texture2D tex)
 {
     AndroidCamera.instance.OnImageSaved += OnImageSaved;
     AndroidCamera.instance.SaveImageToGallery(tex, "Screenshot" + AndroidCamera.GetRandomString());
 }
Beispiel #6
0
 public void TakeScreenShot()
 {
     AndroidCamera.Instance.SaveScreenshotToGallery("Screenshot" + AndroidCamera.GetRandomString());
 }