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); }
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(); }
public static void DeserializeCameraImage(bool p_saveToGallery) { FixInstanceName(); CrossPickerServices.CallPickerFinishEvent(null); if (p_saveToGallery) { CrossPickerServices.CallImageSavedFailedEvent(); } Debug.Log("DeserializeCameraImage is Invalid on Standalone"); }
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); }