Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by ronronmx · Jun 01, 2011 at 09:21 PM · iphonesavingscreenshot

Saving screenshot to iPhone Camera Roll

Hey everyone...
How can I save a screenshot to the iPhone camera roll? I'm using "Application.CaptureScreenshot(Application.datapath + string)" but it fails to save to the camera roll, I always get an error saying it failed to save the file.

Do i need to use the iPhone SDK to achieve this, or is there a way to do it with unity classes? If I need to use the iPhone SDK, which is C or C++ (not sure hehe), how does that work with Unity? Example (found on web):

 CGRect screenRect = [[UIScreen mainScreen] bounds];
 UIGraphicsBeginImageContext(screenRect.size);
 
 CGContextRef ctx = UIGraphicsGetCurrentContext();
 [glView.layer renderInContext:ctx];
 
 UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
 UIGraphicsEndImageContext();
 
 UIImageWriteToSavedPhotosAlbum(viewImage, self, nil, nil); 

Thanks in advance!

Comment
Add comment · Show 1
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 Anxo · Jun 01, 2011 at 10:10 PM 0
Share

interested in this as well.

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by zehreken · Jul 18, 2012 at 02:22 PM

There is a plug-in named 'Etcetera' from Prime31, with it you can take screenshots and do other misc. stuff like testing email, sms availability, showing native ui elements. You can write your own plug-ins for unity using obective-c but it is a pro only feature.

plugin reference

Comment
Add comment · 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
0

Answer by DeveshPandey · Oct 24, 2013 at 10:59 AM

see this : http://answers.unity3d.com/questions/387371/passing-a-value-from-unity-to-objective-c.html

or you can write me for plugin to do this.

Comment
Add comment · Show 2 · 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 DeveshPandey · Jun 22, 2014 at 06:00 AM 0
Share

you can use this plugin : CaptureAndSave

avatar image DeveshPandey · Feb 11, 2015 at 03:29 PM 0
Share

Browse image,video and contact in Android

https://www.assetstore.unity3d.com/en/#!/content/28597

Open gallery or another android app from unity

http://u3d.as/content/devesh-pandey/app-launcher/8$$anonymous$$H

avatar image
0

Answer by vickygroups · Apr 29, 2014 at 10:48 PM

Prime31 has no instructions, and their forums are filled with questions about how to take the photo. Unless you are a serious programmer, it's not going to work. I just spent 3 hrs trying the ideas on their forums, all of which give errors.

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 pixel_fiend · Jun 28, 2016 at 12:30 AM 0
Share

Here is the documentation for the etcetera plugins: https://prime31.com/docs#androidEtc | https://prime31.com/docs#iosEtc

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to check what iDevice your using and adjust GUI sizes according... 1 Answer

how to make simple touch commands and play animation? 1 Answer

TPS Camera with Joystick (Android) 0 Answers

build for iphone - "function is not a member of object" 1 Answer


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