コード例 #1
0
        protected virtual void NativeImagePickedEnd(string p_path)
        {
            var v_texture           = !string.IsNullOrEmpty(p_path)? NativeCamera.LoadImageAtPath(p_path, -1, false) : null;
            var v_temporarySavePath = CrossPickerServices.SaveTextureToTemporaryPath(v_texture);

            CrossPickerServices.CallPickerFinishEvent(v_temporarySavePath, v_texture);
        }
コード例 #2
0
        protected void Hide_Internal(ExternImgFile result, bool forceCallEventIfFailed, bool callHide)
        {
            if (callHide)
            {
                Hide();
            }

            UnregisterEvents();
            if (result != null && !string.IsNullOrEmpty(result.Url))
            {
                if (_onPickerSucessCallback != null)
                {
                    _onPickerSucessCallback(result);
                }
                _onPickerSucessCallback = null;
                if (OnPickerSucess != null)
                {
                    OnPickerSucess.Invoke(result);
                }
            }
            else
            {
                if (forceCallEventIfFailed)
                {
                    CrossPickerServices.CallPickerFinishEvent(result);
                }
                if (_onPickerFailedCallback != null)
                {
                    _onPickerFailedCallback();
                }
                _onPickerFailedCallback = null;
                OnPickerFailed.Invoke();
            }
            base.Hide();
        }
コード例 #3
0
        public static void DeserializeCameraImage(bool p_saveToGallery)
        {
            FixInstanceName();
            CrossPickerServices.CallPickerFinishEvent(null);
            if (p_saveToGallery)
            {
                CrossPickerServices.CallImageSavedFailedEvent();
            }

            Debug.Log("DeserializeCameraImage is Invalid on Standalone");
        }
コード例 #4
0
        protected virtual void NativeCameraPickedEnd(string p_path, bool p_saveToGallery)
        {
            var v_texture = !string.IsNullOrEmpty(p_path) ? NativeGallery.LoadImageAtPath(p_path, CrossPickerServices.MaxImageLoadSize, false, false) : null;

            if (p_saveToGallery && v_texture != null)
            {
                CrossPickerServices.SerializeDataToAlbum(v_texture, System.IO.Path.GetFileNameWithoutExtension(p_path));
            }
            var v_temporarySavePath = CrossPickerServices.SaveTextureToTemporaryPath(v_texture); //CrossPickerServices.GetTemporarySavePath(CrossPickerServices.GetUniqueImgFileName(CrossPickerServices.EncodeOption));

            CrossPickerServices.CallPickerFinishEvent(v_temporarySavePath, v_texture);
        }