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 /
  • Help Room /
avatar image
1
Question by BonyYousuf · Jul 17, 2017 at 10:44 AM · bug-perhapsmigration

ScreenCapture.CaptureScreenshot is not working in 2017.1

Hi, After updated to Unity 2017.1 my ScreenCapture.CaptureScreenshot code is not working properly. It generates screenshot of random window/panels, sometimes including the "game" window. The same code worked just fine in 5.6 (I know it was called Application.CaptureScreenshot prior to 2017.1)

Is anyone else having this issue? What is the work around?

TIA

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

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by davedev · Jul 20, 2017 at 12:09 PM

Documentation says its been removed:

https://docs.unity3d.com/ScriptReference/Application.CaptureScreenshot.html

Comment
Add comment · Show 3 · 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 BonyYousuf · Jul 20, 2017 at 03:53 PM 0
Share

I know "Application.CaptureScreenshot" been removed. That is why I specially mentioned in the title and in the description that I am using "ScreenCapture.CaptureScreenshot". -_- Anyhow I am getting this weird issue with this latest ScreenCapture.CaptureScreenshot function. It worked fine in 5.6 when I was using Application.CaptureScreenshot

avatar image overmats · Jul 25, 2017 at 07:45 PM 0
Share

Hi, have the same problem. "Application.CaptureScreenshot" worked in 5.6 and now the new "ScreenCapture.CaptureScreenshot" is not working at all. I need to capture an ArchViz animation, witch i did with the new timeline tool and now i do not know what to do. Anyone knows how to get this working again? thanks in advance

avatar image SandLantern · Apr 16, 2019 at 09:00 PM 0
Share

Why was this upvoted? You clearly didn't read the question.

avatar image
1

Answer by BonyYousuf · Jul 27, 2017 at 04:21 PM

Just found out that, if you set your game view to "Free Aspect" then this problem is less likely to happen. But it is still not guaranteed.

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 RoyalGamesBE · Sep 04, 2017 at 12:57 PM

 private bool m_screenShotLock = false;
 
     private void LateUpdate()
     {
         if (Input.GetKeyDown(KeyCode.S) && !m_screenShotLock)
         {
             m_screenShotLock = true;
             StartCoroutine(TakeScreenShotCo());
         }
     }
 
     private IEnumerator TakeScreenShotCo()
     {
         yield return new WaitForEndOfFrame();
 
         var directory = new DirectoryInfo(Application.dataPath);
         var path = Path.Combine(directory.Parent.FullName, string.Format("Screenshot_{0}.png", DateTime.Now.ToString("yyyyMMdd_Hmmss")));
         Debug.Log("Taking screenshot to " + path);
         ScreenCapture.CaptureScreenshot(path);
         m_screenShotLock = false;
     }

This code worked for me - it seemed that using LateUpdate alone did not do the trick. But using a Coroutine and waiting for end of frame worked finally.

I did not have the exactly same problem as every sceenshot turned out as black image for me, but I hope that helps anyone.

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 zarkosrbija · Sep 04, 2017 at 02:38 PM 1
Share

It working in editor. But on Android Device it does not work.

avatar image
0

Answer by SandLantern · Apr 16, 2019 at 09:16 PM

For me, I needed to make sure to go to the package manager, select "Built-in packages" and then Make sure that Screen Capture and Image Conversion were both enabled. Package Manager


untitled.png (23.4 kB)
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

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

Related Questions

Weird black lines appearing on Unity 5.4 0 Answers

GetInstanceID not unique 2 Answers

Problem with Transform.... 0 Answers

Cubemap Mip-blending inaccurate? 0 Answers

Why does Play In Editor close my currently Running Standalone Copy 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