"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Gets Black Screen in My Screenshots with Prime31 Social Network

Hello

Im using Vuforia + Prime31 Social Network, and i want to capture screenshots and  share it via email or facebook, but when i capture screenshot  the QCAR stops and i get the blackscreenshot with my GUI. How can i capture screenshot with vuforia ?

here is my code that im using from Prime31:

 

using UnityEngine;

using System.Collections;

using Prime31;

 

 

#if UNITY_IPHONE

public class SharingGUIManager : MonoBehaviourGUI

{

public static string screenshotFilename = "someScreenshot.png";

 

 

void Start()

{

// listen to the events fired by the SharingManager for illustration purposes

SharingManager.sharingFinishedWithActivityTypeEvent += ( activityType ) =>

{

Debug.Log( "sharingFinishedWithActivityTypeEvent: " + activityType );

} ;

 

SharingManager.sharingCancelledEvent += () =>

{

Debug.Log( "sharingCancelledEvent" );

} ;

 

// grab a screenshot for later use

Application.CaptureScreenshot( screenshotFilename );

}

 

 

void OnGUI()

{

beginColumn();

 

if( GUILayout.Button( "Share URL and Text" ) )

{

SharingBinding.shareItems( new string[] { "http://prime31.com", "Here is some text with the URL" } );

}

 

 

if( GUILayout.Button( "Share Screenshot" ) )

{

Application.CaptureScreenshot( screenshotFilename );

var pathToImage = System.IO.Path.Combine( Application.persistentDataPath, screenshotFilename );

if( !System.IO.File.Exists( pathToImage ) )

{

Debug.LogError( "there is no screenshot avaialable at path: " + pathToImage );

return;

}

 

SharingBinding.shareItems( new string[] { pathToImage } );

}

 

 

if( GUILayout.Button( "Share Screenshot and Text" ) )

{

Application.CaptureScreenshot( screenshotFilename );

var pathToImage = System.IO.Path.Combine( Application.persistentDataPath, screenshotFilename );

if( !System.IO.File.Exists( pathToImage ) )

{

Debug.LogError( "there is no screenshot avaialable at path: " + pathToImage );

return;

}

 

SharingBinding.shareItems( new string[] { pathToImage, "Here is some text with the image" } );

}

 

endColumn();

 

 

if( bottomRightButton( "Facebook..." ) )

{

Application.LoadLevel( "FacebookTestScene" );

}

}

 

}

#endif

 

Thank You

Attachment