Log in or register to post comments

Gets Black Screen in My Screenshots with Prime31 Social Network

July 14, 2013 - 5:18am #1

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

Gets Black Screen in My Screenshots with Prime31 Social Network

January 10, 2014 - 10:34am #4

hi boomidi, do you solve the problem. i face the samething like you, i really dont understand about the solution for theblack screen.

Gets Black Screen in My Screenshots with Prime31 Social Network

July 15, 2013 - 3:58am #3

Thank you David for your reply, Actualy im new to unity, and im doing my school stuff.

i want to explain what ive done that you can please explain how to make it work:

Im using a BackgroundTextureAccess project and im using a  RenderTextures method

So ive import the projects and from inspector unchecked the BackgroundCamera to Deactivate the BackgroundCamera,

then i dont know how to  activate the VideoBackground child of the ARCamera ?

ive searched  Video background access but didnt find something useful.

Sorry for my stupid question.

Thanks

Gets Black Screen in My Screenshots with Prime31 Social Network

July 14, 2013 - 2:30pm #2

Vuforia needs to have exclusive access to the camera while the QCARBehaviour is enabled. Here is an article on enabling screen shots - https://developer.vuforia.com/resources/dev-guide/unity-screenshots

Log in or register to post comments