Exemplo n.º 1
0
 private void InvokeCallback(bool success, Texture2D texture)
 {
     if (_callback != null)
     {
         _callback.Invoke(success, texture);
         _callback = null;
     }
 }
Exemplo n.º 2
0
    public void SelectImage(int maxSize, OnLoadedImage callback)
    {
        _callback = callback;

                #if UNITY_EDITOR
        string path = UnityEditor.EditorUtility.OpenFilePanel("Open image", "", "jpg,png,bmp");

        if (!System.String.IsNullOrEmpty(path))
        {
            StartCoroutine(LoadTexture("file:///" + path));
        }
                #else
        Application.ExternalCall(WEB_SELECT_IMAGE, maxSize);
                #endif
    }
Exemplo n.º 3
0
    public void EnableCamera(int maxSize, OnLoadedImage callback)
    {
        _callback = callback;

        Application.ExternalCall(WEB_ENABLE_CAMERA, false, maxSize);
    }