Is this possible? I've been trying to pass as: byte bytes = screenShot.EncodeToPNG(); but Flash receives as CLIObject and if I try to use as ByteArray it returs as a null obj.
Jun 29 '12 at 01:34 PM
Jun 29 '12 at 01:25 PM
Could you add a few snippets of the code you're using so we can see what you're trying?
[solved] a friend just found an easy way of doing that.
var bmp:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, false); stage.stage3Ds.context3D.drawToBitmapData(bmp);
Jun 29 '12 at 02:35 PM
where do you call stage.stage3Ds.context3D.drawToBitmapData(bmp)? because it for me it gives "Error #3692: All buffers need to be cleared every frame before drawing", which means I'm not calling that function between render and present or something like that.
Found my problem: you need to use WaitForEndOfFrame. In my case I was using that, but calling something more (like Applicaiton.CaptureScreenshot) which, I guess, was conflicting with stage operations.
Would you mind telling me how you achieved the "Taking screenshot" part, I can't manage to get it working on the Flash build (as far as I'm concerned, nor Application.CaptureScreenshot() nor Texture.ReadPixels() do work on this platform).
You need to use ActionScript function to capture screenshot into BitmapData as explained in this answer, once you have that you can transfer that BitmapData to Unity Texture.
Yeah, thanks, I figured it out a bit after. I thought at first that this was just "passing the file from Unity to Flash", as the title suggested, as I know nothing about AS.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Jun 29 '12 at 01:34 PM
Seen: 523 times
Last Updated: Mar 04 at 04:46 PM
I need to take a screenshot from a FLASH BUILD
Is is possible to output screenshots from Unity?
How do I take a high quality screen shot from my scene view camera?
How to save a picture (take screenshot) from a camera in game?
How to take a Screenshot that includes GUI
Taking huge screenshots using camera array?
Taking a sequence of screenshots
Trying to read pixel out of bounds - screenshot of just half the screen
Resizing a screenshot (mobile)