예제 #1
0
        private IEnumerator ShowViewCoroutine(IShareView _shareView, SharingCompletion _onCompletion)
        {
            while (!_shareView.IsReadyToShowView)
            {
                yield return(null);
            }

            // Pause unity player
            this.PauseUnity();

            // Cache callback
            OnSharingFinished = _onCompletion;

            if (_shareView is MailShareComposer)
            {
                ShowMailShareComposer((MailShareComposer)_shareView);
            }
            else if (_shareView is MessageShareComposer)
            {
                ShowMessageShareComposer((MessageShareComposer)_shareView);
            }
            else if (_shareView is WhatsAppShareComposer)
            {
                ShowWhatsAppShareComposer((WhatsAppShareComposer)_shareView);
            }
            else if (_shareView is FBShareComposer)
            {
                ShowFBShareComposer((FBShareComposer)_shareView);
            }
            else if (_shareView is TwitterShareComposer)
            {
                ShowTwitterShareComposer((TwitterShareComposer)_shareView);
            }
            else
            {
                ShowShareSheet((ShareSheet)_shareView);
            }
        }
예제 #2
0
		private IEnumerator ShowViewCoroutine (IShareView _shareView, SharingCompletion _onCompletion)
		{
			while (!_shareView.IsReadyToShowView)
				yield return null;

			// Pause unity player
			this.PauseUnity();
			
			// Cache callback
			OnSharingFinished	= _onCompletion;

			if (_shareView is MailShareComposer)
			{
				ShowMailShareComposer((MailShareComposer)_shareView);
			}
			else if (_shareView is MessageShareComposer)
			{
				ShowMessageShareComposer((MessageShareComposer)_shareView);
			}
			else if (_shareView is WhatsAppShareComposer)
			{
				ShowWhatsAppShareComposer((WhatsAppShareComposer)_shareView);
			}
			else if (_shareView is FBShareComposer)
			{
				ShowFBShareComposer((FBShareComposer)_shareView);
			}
			else if (_shareView is TwitterShareComposer)
			{
				ShowTwitterShareComposer((TwitterShareComposer)_shareView);
			}
			else 
			{
				ShowShareSheet((ShareSheet)_shareView);
			}
		}
예제 #3
0
 /// <summary>
 /// Shows the native view for sharing specified contents.
 /// </summary>
 /// <param name="_shareView">The object represents the composer that you want to use for sharing items.</param>
 /// <param name="_onCompletion">Callback that will be called after operation is completed.</param>
 public void ShowView(IShareView _shareView, SharingCompletion _onCompletion)
 {
     StartCoroutine(ShowViewCoroutine(_shareView, _onCompletion));
 }
예제 #4
0
		public void ShowView (IShareView _shareView, SharingCompletion _onCompletion)
		{
			StartCoroutine(ShowViewCoroutine(_shareView, _onCompletion));
		}