Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 PsychoDuckArcade · Aug 04, 2015 at 09:03 PM · filepngcapturescreenshotdocuments

Application.CaptureScreenshot() on iOS not creating file.

I made an extremely simple test scene with a button that calls Application.CaptureScreenshot("test.png"). On the computer this works fine: it saves a screenshot called test.png to the root of the program. However, on iOS the file doesn't exist anywhere on the device (tried a full file search on it). The API doesn't say, but apparently it's supposed to save to the devices Documents folder:

http://ralphbarbagallo.com/2012/04/09/3-ways-to-capture-a-screenshot-in-unity3d/ http://answers.unity3d.com/questions/322677/ios-find-screenshot.html http://forum.unity3d.com/threads/capture-screenshot-from-iphone-and-save-it-in-documents-folder.85607/

Using the devices built-in screenshot shortcut works fine (home+power button).

I've tried 2 different iPads and it doesn't work on either.

EDIT: I discovered there's actually more than one documents folder (one for the iPad and then one per app), but neither contains the screenshots. I also discovered that the search function I've been using in iExplorerer doesn't work properly so the screenshots might be saving somewhere that I can't find. Any suggestions?

Comment
Add comment · Show 3
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 imilanspinka · Aug 05, 2015 at 05:50 PM 0
Share

Okay.. I think you are not using any iOS UI references.. are you?

avatar image PsychoDuckArcade · Aug 05, 2015 at 05:55 PM 0
Share

I don't know what you mean so I'm assu$$anonymous$$g, no?

avatar image PsychoDuckArcade · Aug 12, 2015 at 09:38 PM 0
Share

Ugh bumped every day for 8 days and no solutions? This is honestly extremely baffling considering how simple this is supposed to be.

$$anonymous$$nowing apple, I'm thinking maybe it has something to do with a security limitation? I have no idea.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Lancemaker_ · Aug 12, 2015 at 10:43 PM

hello Try this : http://answers.unity3d.com/questions/731509/applicationcapturescreenshot-doesnt-save-anything.html

i looked at unity documentation and it has the parameter filename on it. So just add the System.IO and test it with a path.

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 PsychoDuckArcade · Aug 13, 2015 at 09:23 PM 0
Share

Yeah i DID include System.IO otherwise it would throw me a syntax error. I discovered there's actually more than one documents folder (one for the iPad and then one per app), but neither contains the screenshots. I also discovered that the search function I've been using in iExplorerer doesn't work properly so the screenshots might be saving somewhere that I don't see.

I also tried just saving a simple txt file and I cant find that anywhere on the device either.

avatar image
0

Answer by Dave-Carlile · Aug 24, 2015 at 08:07 PM

From the documentation: "On mobile platforms the filename is appended to the persistent data path."

Have you tried logging the value of Application.persistentDataPath? That should tell you where it's being saved.

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

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

26 People are following this question.

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

Related Questions

How to Save PNG in android...? 1 Answer

How do I convert an 8-bit PNG file to a Color[x,y] and vice versa? 1 Answer

Export a png from texture2D 1 Answer

copy png from assetbundle into another folder 0 Answers

Creating a Directory in "My Documents" 2 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