public override void OnEnter()
        {
#if USES_SHARING
            // Create composer
            WhatsAppShareComposer _composer = new WhatsAppShareComposer();

            switch (shareOption)
            {
            case eShareOption.ShareText:
                _composer.Text = text.Value;
                break;

            case eShareOption.ShareScreenshot:
                _composer.AttachScreenShot();
                break;

            case eShareOption.ShareImage:
                _composer.AttachImage((Texture2D)image.Value);
                break;

            case eShareOption.ShareImageAtPath:
                _composer.AttachImageAtPath(imagePath.Value);
                break;

            default:
                Log("[Sharing] Unhandled option.");
                break;
            }

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
#endif
        }
Beispiel #2
0
        private void ShareImageOnWhatsApp()
        {
            // Create composer
            WhatsAppShareComposer _composer = new WhatsAppShareComposer();

            _composer.AttachImageAtPath(GetImageFullPath());

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
        }