"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
screenshot
By oba
on Wed, 06/20/2012 - 17:09
I want a script to take a screen shot from my scene view camera?
ok, so Application.Screenshot wouldn't really work as the camera feed wouldn't show up in that. Ive gone ahead and traied it and now I'm sure it doesn't work.
are you trying to do this on the phone or on your computer? i haven't used it with 1.5 but i have used EncodeToPng as well as Application.Screenshot with version 1.0.6 on android without any problems. i'll give it a try tomorrow but i don't see why it shouldn't work...
best,
stefan
When i take a screenshot on my iPad, Application.Screenshot just displays what unity renders , so what I'm getting here is just my GUI with a black background.
This is obviously not what I'm looking for.
Hi,
i'm sorry i just have an android tablet available and there everything works as expected.
i use
[CODE]function OnGUI() {
if (GUI.Button(new Rect(10,10,150,150),"ScreenShot")){
Application.CaptureScreenshot("TestShot.png");
}
}[/CODE]
and get a perfect screenshot with the came
Thats so strange. Am i doing something wrong or is this a bug? Im attaching a screenshot of what I'm getting with Application.CaptureScreenshot()
Any help would be highly appreciated!
ok, i might have access to an iphone a bit later today then I'll give it a try.
how do you trigger the Application.CaptureScreenshot()? when you click a button or somehow else?
My bet is that you'll either have to capture the screenshot on the native level or render the QCAR feed onto a mesh inside Unity so Unity actually "sees" the feed. Rendering to texture inside Unity has been available since QCAR beta 1.5
stefann , what is the path of the saved screenshot on your android ?
i tried your code
Application.CaptureScreenshot("Screenshot.png");
but i can`t find the saved screen shot !!
ok, i finally managed to test it and i get a perfect result on iOS and Android. in both cases (tested on an xperia x10, running android 2.3.3 and an iPhone 3gs, running iOS 5.0.1) i get a screenshot with the menu, 3d elements and the background in it. i attached the two screenshots.
hey Stefan,
I know this might be too much to ask but can you downgrade to 3.4.2 version of unity and check if this works? Would be great if you could
Thanks for your help so far!
hi,
as i said i don't have an ios device available all the time so it might take some time. but i'll give it a try as soon as i have the chance.
by the way, is there a particular reason why you don't simply update to 3.5?
best,
stefan
sorry, i forgot, here is a link with the description on how to get the screenshot in xcode:
http://stackoverflow.com/questions/6121613/browse-the-files-created-on-a-d
There was a bug in the encodeToPNG function in unity 3.4.2 on android. This has been fixed in Unity 3.5. Unity could read the png files it encoded but they were not valid pngs and other applications couldn't read them.
thanks macsrok, i know that but this is not the issue we are talking about here. the problem is that in an iOS app the video of the background image is apparently not visible in the screenshot in unity 3.4.2 while in 3.5 it is.
best,
stefan
Hey,
When i download the file with the above method you linked me to, it downloads a xcappdata file and not a png. How do i download the png in the app folder?
Thanks
This is all nice. But i would like to create an app where i push the screenshot button and the sceenshot will appear into ipad photo album (camera roll). How can this be done? Do i have to start playing with native code or can this be done in Unity?
Thanks
Re: screenshot
screenshot
Dear Stefan
may I ask can you re post the scripts in here or send the link to my email : chickenson_kei@hotmail.com? Since the linked page is not existed
thx alot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot
Re: screenshot