Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by tonycoculuzzi · Dec 05, 2011 at 07:09 AM · iosguitexturescreenshotwww.texture

Capture a screenshot and use it as a GUITexture on iOS

Is it possible to capture a screenshot using Application.CaptureScreenshot() and use it as a GUITexture on iOS devices? I've been raking my brain with this for hours.

If Application.CaptureScreenshot() isn't the way to go, does anyone know what the best way to do this would be?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Jun 25, 2012 at 10:55 AM

All you need is Texture2D.ReadPixels which reads a part or the full framebuffer into a texture. This should work even in the free version ;) Not sure about iOS, but it's a quite basic feature.

Another way would be to use Application.CaptureScreenshot, which saves the image as png on the device and then use the WWW class to read the file back in and finally use WWW.LoadImageIntoTexture to apply the image to a texture.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Berenger · Jun 25, 2012 at 03:00 PM 1
Share

Here is an example for ReadPixels.

avatar image
0

Answer by SolidSnake · Dec 06, 2011 at 01:23 PM

did you try render texture?

http://unity3d.com/support/documentation/Components/class-RenderTexture.html

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tonycoculuzzi · Dec 06, 2011 at 10:07 PM 0
Share

I'm almost positive that RenderTexture isn't supported on iOS.

avatar image SolidSnake · Dec 09, 2011 at 11:56 AM 0
Share

no it is supported on iOS

avatar image tonycoculuzzi · Dec 09, 2011 at 12:56 PM 0
Share

using OpenGL ES1.1?

avatar image SolidSnake · Dec 09, 2011 at 02:03 PM 0
Share

I tested it before with OpenGLES 2.0 which is supported since iPhone 3GS. It should be also supported with openGL es 1.1 too unless there is unity limitation. are you using Unity PRO?

avatar image grimmy · Jun 25, 2012 at 10:39 AM 0
Share

Does this means there's a hardware restriction? Ie it wont work on ipod touch 2nd generation etc?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Captured Screenshots as Textures (Pseudocode needed!) 0 Answers

How Can I Generate a Thumbnail from the Screen? 2 Answers

resize screenshot 2 Answers

Screenshot resolution for the App Store 1 Answer

native ios screencapture vs unity Application.captureScreenshot 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges