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
0
Question by Omer.Hussain · Nov 20, 2014 at 12:21 PM · androidcamerascreenshotscreencapture

capture a screen shot and show in the album folder

Hi... i don't know why i am having this issue .. but i have this script to capture the screen shot .. i applied it to a button ... the screen blink when i press the button but when i open the gallery of my tablet it doesn't show the captured screen shot ... :( .. when i test this code on PC or in unity editor it works fine.. it creates the folder at the folder "D:/Omer Hussain/Amigo-Projects/ChristmasStory/ScreenShots"; with the folder name "ScreenShots" and in that folder saves the image with image name "Christmas".... i want the same functionality on the device... i tried to find the folder as well the image with their names but device doesn't show anything but works fine on PC :/...

 using UnityEngine;
 using System.Collections;
 
 public class ScreenShot : MonoBehaviour {
 
     //string folderPath = "D:/Omer Hussain/Amigo-Projects/ChristmasStory/ScreenShots";
     string folderPath = "/storage/sdcard0/ChristmasShots";
     string fileName = "Christmas.png";
 
     void OnMouseDown()
     {
 
 
         if(!System.IO.Directory.Exists(folderPath))
             System.IO.Directory.CreateDirectory(folderPath);
         
         
         Application.CaptureScreenshot(folderPath + "/"+fileName);
     }
     
     }

 



Comment
Add comment · Show 2
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 sumit9236 · Nov 20, 2014 at 12:35 PM 0
Share

You try this one.This is a complete solution of capture screenshot http://u3d.as/content/devesh-pandey/capture-and-save/86U

avatar image FairGamesProductions · Nov 20, 2014 at 12:47 PM 0
Share

No. He really doesn't!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by FairGamesProductions · Nov 20, 2014 at 12:47 PM

This command would most likely save the screenshot in the game folder.

If you want to change the save location, you need to supply a full path for the file save location. Also, this command overrides the previously saved file if you run it twice with the same save file name.

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 Omer.Hussain · Nov 24, 2014 at 10:12 AM 0
Share

@FairGamesProductions how do we do that ... and any other solution for not overriding the image and show it in the gallery :/

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

28 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 avatar image avatar image

Related Questions

How to open Device camera in full view in unity 3d. 1 Answer

Screenshot function not working properly ,it records button on UI ? 0 Answers

Application crashes when taking screenshot on Android with API >28 0 Answers

how to open the android camera in unity without using Qualcomm'AR 0 Answers

Cant find where the screenshots are saved or if they are even taken 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