Log in or register to post comments

Photo from camera help

July 21, 2012 - 9:28pm #1

How would I go about using a button to snap a picture of the AR scene in Untiy3d? I would then want the image to be saved to the photo album. I'll buy a plugin if that's what it takes. The plugins on Prim31 does not work well and the documentation is not well written. Thanks for any help. Something similar to the paparazzi game done with Vuforia. 

 

Thanks much

 

 

Photo from camera help

September 4, 2012 - 11:00am #6

I disagree, I am very happy with the plugins I have used so far. 

 

Photo from camera help

September 4, 2012 - 10:53am #5

niklas_w wrote:

Hi!

The simplest solution is to buy the Etcetera plugin from prime31. They have versions for ios and Android.

HTH

 

Niklas Wörmann

 

So i'm guessing it's not a hot topic or no one really cares to share or drop some insights on how it's done with spenging some dime. I have terrible luck with prime 31 plugins. They are buggy, and support is lacking. 

Photo from camera help

September 3, 2012 - 6:26am #4

Hi!

The simplest solution is to buy the Etcetera plugin from prime31. They have versions for ios and Android.

HTH

 

Niklas Wörmann

Photo from camera help

August 31, 2012 - 1:24pm #3

DavidBeard wrote:

You can use Unity's Application.CaptureScreenshot method to save a screenshot to the file system as a png. The screenshot should contain both the camera image and augmentation, as long as this method is called after the scene has had a chance to render everything. Here's an example of calling it from the OnGUI method:

void OnGUI() {

if (GUI.Button(new Rect(20, 20, 150, 100), "CaptureScreenshot"))

{

Application.CaptureScreenshot("Screenshot.png");

}

}

For this to work on Android, Write Access needs to be set to "External (SDCard)" in the Player Settings. The file will end up in the sdcard/Android/data/<bundle id>/files folder. Make sure the sdcard is not mounted when running the app, otherwise the file will not be written. On iOS, the file will end up in the application Documents folder. To access this folder from iTunes you need to add the UIFileSharingEnabled key to your Info.plist file (in the Xcode project Unity creates).

 

Oh WOW! I asked this so long ago, but never got a response. Thank you! I will give it shot. One question:

1. How would I let the user save it to phone phone album? Is it possible with what you suggested "UIFileSharingEnabled"?

Photo from camera help

July 22, 2012 - 10:24am #2

You can use Unity's Application.CaptureScreenshot method to save a screenshot to the file system as a png. The screenshot should contain both the camera image and augmentation, as long as this method is called after the scene has had a chance to render everything. Here's an example of calling it from the OnGUI method:

void OnGUI() {

if (GUI.Button(new Rect(20, 20, 150, 100), "CaptureScreenshot"))

{

Application.CaptureScreenshot("Screenshot.png");

}

}

For this to work on Android, Write Access needs to be set to "External (SDCard)" in the Player Settings. The file will end up in the sdcard/Android/data/<bundle id>/files folder. Make sure the sdcard is not mounted when running the app, otherwise the file will not be written. On iOS, the file will end up in the application Documents folder. To access this folder from iTunes you need to add the UIFileSharingEnabled key to your Info.plist file (in the Xcode project Unity creates).

Log in or register to post comments