Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

⭐ ULTIMATE SCREENSHOT CREATOR ⭐ - perfect for marketing and ingame screenshots

Discussion in 'Assets and Asset Store' started by WildMageGames, Mar 17, 2017.

  1. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    There is currently no such feature in the asset.

    However, this could be made that way with a simple script:
    Create a script that reference a ScreenshotManager and your scroll rect, by creating a coroutine that will capture a screenshot, move the scrollrect, etc, until you reach the maximum scroll value.
     
  2. nastenke

    nastenke

    Joined:
    Mar 3, 2017
    Posts:
    5
    Hello, I have Crash in Google play looks like it's related to Screenshot plugin, because NativeShare is a part of it.
    How to fix it?

    Crash details
    java.lang.Error
    com.yasirkula.unity.NativeShareBroadcastListener.Initialize

    java.lang.Error: FATAL EXCEPTION [main]
    Unity version : 2020.3.31f1
    Device model : motorola moto g(30)
    Device fingerprint: motorola/caprip_retail/caprip:12/S0RCS32.41-10-9-2/0ad17-9cdbb:user/release-keys
    Build Type : Release
    Scripting Backend : IL2CPP
    ABI : arm64-v8a
    Strip Engine Code : true
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    at android.app.PendingIntent.checkFlags (PendingIntent.java:377)
    at android.app.PendingIntent.getBroadcastAsUser (PendingIntent.java:647)
    at android.app.PendingIntent.getBroadcast (PendingIntent.java:634)
    at com.yasirkula.unity.NativeShareBroadcastListener.Initialize (NativeShareBroadcastListener.java:32)
    at com.yasirkula.unity.NativeShareFragment.onCreate (NativeShareFragment.java:42)
    at android.app.Fragment.performCreate (Fragment.java:2486)
    at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1261)
    at android.app.FragmentManagerImpl.addAddedFragments (FragmentManager.java:2431)
    at android.app.FragmentManagerImpl.executeOpsTogether (FragmentManager.java:2210)
    at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute (FragmentManager.java:2166)
    at android.app.FragmentManagerImpl.execPendingActions (FragmentManager.java:2067)
    at android.app.FragmentManagerImpl$1.run (FragmentManager.java:742)
    at android.os.Handler.handleCallback (Handler.java:938)
    at android.os.Handler.dispatchMessage (Handler.java:99)
    at android.os.Looper.loopOnce (Looper.java:226)
    at android.os.Looper.loop (Looper.java:329)
    at android.app.ActivityThread.main (ActivityThread.java:8058)
    at java.lang.reflect.Method.invoke (Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1026)
     
  3. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello
    I'm sorry you are having an issue with the asset.
    What is the phone and OS version you are having this crash ?
    Can you tell me more about that crash, when does it happen?
     
  4. nastenke

    nastenke

    Joined:
    Mar 3, 2017
    Posts:
    5
    I don't know when it's happen, in my device it works perfectly, but in Google Play report I see a lot of crashes.
    Here the list of devices:
    realme 8 Android 12 (SDK 31)
    Samsung Galaxy A52 Android 12 (SDK 31)
    Samsung Galaxy S20 FE 5G Android 12 (SDK 31)
    Samsung Galaxy S21 5G Android 12 (SDK 31)
    Samsung Galaxy S22 Android 12 (SDK 31)
    Redmi Note 10 Android 12 (SDK 31)
    Samsung Galaxy Note20 Ultra 5G Android 12 (SDK 31)
    Samsung Galaxy Tab S7 Android 12 (SDK 31)
    Motorola moto g(30) Android 12 (SDK 31)
    realme C25 Android 12 (SDK 31)

    All of them happens at Android 12 (SDK 31)

     
  5. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Thanks for the details.
    This seams to be indeed a bug related to Android 12 coming from Native Share, I'm very sorry for the inconvenience.

    I will look at it and keep you updated.

    Meanwhile, I would recommend disabling the sharing feature for Android 12 to prevent such issue until the issue is solved, for instance by disabling the share button:
    Code (CSharp):
    1. if ( AndroidUtils.GetAndroidSDKVersion()  >= 31) {
    2. sharebutton.SetActive(false);
    3. }
     
  6. nastenke

    nastenke

    Joined:
    Mar 3, 2017
    Posts:
    5
    Thanks!
     
  7. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    G'day!
    I'm using this simple code to allow the user to capture a shot of their character in the game -

    Code (CSharp):
    1. snapshotPath = Application.persistentDataPath + "/Snap.png";
    2. SimpleScreenshotCapture.InitScreenshotTaker();
    3. yield return StartCoroutine(SimpleScreenshotCapture.CaptureCoroutine
    4. (snapshotPath, 1024, 1024, TextureExporter.ImageFileFormat.PNG, 100, new List<Camera> { snapshot.camera }, null, ScreenshotTaker.CaptureMode.RENDER_TO_TEXTURE, 8));
    This works but it is there a way to stop it from automatically saving to the users PhotoGallery?
    I still want to save to the ApplicationData path, is that possible?

    Thanks,
    Pete

    Great Asset by the way :D
     
  8. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello

    Yes, in the SimpleScreenshotCapture.CaptureCoroutine method call just set the exportToGallery parameter to false:
    Code (CSharp):
    1. SimpleScreenshotCapture.CaptureCoroutine(snapshotPath, 1024, 1024, TextureExporter.ImageFileFormat.PNG, 100, new List<Camera> { snapshot.camera }, null, ScreenshotTaker.CaptureMode.RENDER_TO_TEXTURE, 8, true, ScreenshotTaker.ColorFormat.RGB, false, false));
     
    petey likes this.
  9. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
  10. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Great time saver!

    just would be nice to have that "your game logo"-disabled by default,
    now need to go search documentation on how to disable it..

    some issues:
    screenshot filename is "2688x1242-screenshot-iPhone 6.5 inch - 11 Pro Max, 11, XS Max, XR.png"
    but the actual resolution is 1242x2688 ? (flipped height and width..) *ok clicked switch default templates all to landscape seems to fix that

    one resolution seems to fail on capture?
    [d3d11] attempting to ReadPixels outside of RenderTexture bounds! Reading (0, 0, 2048, 2732) from (1920, 1080)
     
    Last edited: Jun 2, 2022
  11. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    sorry about "game logo", I thought it was already disable by default, I will check the example scenes.

    "2688x1242" the symbols refers to the device resolutions, this is why when you flip the display portrait/landscape it doesn't not invert their values.

    Can you tell me more about your capture issue and when it happens ? Do you have some steps to reproduce it ? What graphics card do you have ?
     
  12. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    329
    I get the same issue, have a bunch of resolutions setup and three of them fail with the same [d3d11] attempting to ReadPixels outside of RenderTexture bounds! Reading (0, 0, 2048, 2732) from (1920, 1080) error. But with the wanted resolution of course. Using Unity 2020.3.33f1 and URP.
     
  13. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello
    After some testing it appears that this error may happens in some cases with URP with 2020.3. From my tests, the issue will happens only when you try to capture consecutively two same resolutions:

    temporary workaround -> please reorder all the resolutions you want to capture so that two consecutive captures do not have the same dimensions.

    In last version I optimized the capture process, to gain a few time, I will check with this case fails and publish an update ass soon as possible. If you notice this error in other situations please let me know.
     
    Last edited: Aug 18, 2022
    petey likes this.
  14. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    169
    Updating Native Share to latest version fix the problem. Fixed in Native Share 1.4.6
     
    WildMageGames and B-Erolskiy like this.
  15. nickcolthorpe

    nickcolthorpe

    Joined:
    Jan 20, 2019
    Posts:
    6
    Hi, this asset is excellent and has given me the functionality I was looking for and much more, so thank you for making this.

    I do have a question though. I am creating a first-person DIY simulation type game and using this asset for the player to take a photo of the completed jobs (image 1), view them in the gallery and share them with an NPC girlfriend (image 2) who responds depending on various conditions (image 3).

    Within the messages I would like a thumbnail of the photo to show, so not only would I need one for the Gallery Greybox, but for this aswell and generate it within a prefab. How could this be done?

    Also, I notice that the images are stored in a folder on the PC, but if the player deletes the image they have shared, I would not want the image within the messages to disappear.

    I hope this makes sense!!!

    PS: I am using a visual scripting asset called Game Creator (2)

    Kind regards
     

    Attached Files:

  16. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    When you create screenshots, you can chose to save them to the DATA_PATH. That's the folder where your game content is stored, so the user is less likely to remove them.
    When you capture the screenshot, you should store the screenshot path as a reference for later uses.
    When you share your picture via message UI, try creating a RawImage UI object within the message system to display a texture. You can load the texture using the asset utility method TextureExporter.LoadFromFile() and the path you stored previously, and associate it to the RawImage UI texture object.
     
  17. nickcolthorpe

    nickcolthorpe

    Joined:
    Jan 20, 2019
    Posts:
    6
    Hi,

    Thank you for your speedy response.

    The DATA_PATH is a good shout, I will certainly need that when I build the game.

    I have created the RawImage object, but I am not a coder and with Game Creator I can only Invoke a Method. I cannot access the TextureExporter script because it does not derive from Monobehavior. Would I need to create another Greybox Canvas for the message UI?

    Many thanks
     
  18. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,
    It's hard to answer to your question, it's very dependent on how your messaging system works, how the rawimage within are referenced, and on how you capture and store the screenshots.

    I made a custom script for you:
    attach it to your rawimage game object
    when you want to display the texture, use the SetFileName(...) to set the screenshot filename that you stored,
    and then Load() to load the texture. I added ratio scaling settings too.
     

    Attached Files:

  19. nickcolthorpe

    nickcolthorpe

    Joined:
    Jan 20, 2019
    Posts:
    6
    Hi

    Thank you so much, this is very kind of you to write a custom script.

    It is working almost perfectly and I realise I have a very specific use case for this.

    As far as I can see the SetFileName(...) is a string which I have to manually type in, I use this example (Assets\Screenshots\screenshot.png) which pulls that image from the folder.

    Although, I would need the image which is currently open in the greybox to fill that SetFileName field, dependent on which one was chosen from the gallery. I feel that I am so close to having this cracked. Would it have something to do with the CurrentImageId?

    Many thanks
     
    WildMageGames likes this.
  20. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Yes, you can use m_Gallery.m_ImageFiles[m_CurrentImageId].m_FullName to get the full name of the current image in the greybox to be used with SetFileName(...)
     
  21. nickcolthorpe

    nickcolthorpe

    Joined:
    Jan 20, 2019
    Posts:
    6
    Sorry to be a pain, but would I need to add this to the script?
     
  22. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    I do not know how you use the gallery, greybox and the script I sent you, so it's very hard to tell you what to do. If you detail more what your objects are, and how you use them, maybe I will understand and be able to provide more help.
     
  23. nickcolthorpe

    nickcolthorpe

    Joined:
    Jan 20, 2019
    Posts:
    6
    I will email you, I wouldn't want to clog up this thread o_O
     
  24. nickcolthorpe

    nickcolthorpe

    Joined:
    Jan 20, 2019
    Posts:
    6
    Hi

    Did you receive the email that I sent you?

    I forgot to mention that the Invoke Method that I use to access the RawImageDisplayer script looks like the image I have attached.

    Thanks
     

    Attached Files:

  25. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello
    I just answered to you by email :)
     
  26. OscarLeif

    OscarLeif

    Joined:
    Jul 17, 2016
    Posts:
    69
    Hello I have a little issue.
    I want to capture with a hotkey.
    But currently I'm using the Input System and disable the Input Manager (old).
    I cannot take any screenshot using the Hotkeys.
    I already enable "New Input System Support"
    this just add the preprocessor "USC_INPUT_SYSTEM"
     
    Last edited: Jan 22, 2023
  27. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello :)
    Enabling InputSystem support on the asset settings should unlock a new hotkeys menu. Did you set the new input hotkeys ? If so, are they not working in edit mode, in play mode, or in both ? Can you tell me what is your Unity version ?
     
  28. OscarLeif

    OscarLeif

    Joined:
    Jul 17, 2016
    Posts:
    69
    Yes I enable them. For example I try with the combination "Shift Key + X Key" In the "New Input System hotkeys"

    I'm trying to capture in the play mode. Never test the Edit Mode (Need to take screen shoots for store page).
    I'm using the Unity Version 2021.3.16.
    For the Input System package I have the version 1.4.4.
    Ultimate screenshot creator is the version 1.11.0

    I think there's something wrong in the HotKey file after enable the support for the Input System.
    I enable support for Both Input System And Input Manager. I guess this could be a quick solution.
    My game doesn't use Input Manager not sure if I have to disable Input Manager in the release build to avoid include the Input Manager.
     
    Last edited: Jan 23, 2023
  29. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Thanks a lot for the details, I will look at this and see what could go wrong.
     
  30. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,
    there was indeed an issue with the new input system support. I fixed the issue and pushed the update 1.11.1 to the asset store, it should be available in a few hours/days depending on the asset store validation queue.
     
  31. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hi!
    I just updated to Ultimate Screenshot Creator (1.11.4), and I'm noticing a big shift in gamma on the screenshots I'm taking.
    Here's my code for capturing. Is there anything that pops out there as wrong?
    Code (CSharp):
    1. yield return StartCoroutine(SimpleScreenshotCapture.CaptureToFileCoroutine(targetPath, 1024, 1024, TextureExporter.ImageFileFormat.PNG, 100, new List<Camera> { tempCamera }, null, ScreenshotTaker.CaptureMode.RENDER_TO_TEXTURE, 8, true, ScreenshotTaker.ColorFormat.RGB, false, false));
    2.  
    Just wondering what might have changed to cause that? If I revert back to v1.10.1 it looks fine.

    Thanks P.
     
  32. Sarchophagi

    Sarchophagi

    Joined:
    Nov 14, 2014
    Posts:
    5
    Hi!
    I just bought USC 1.11.4 exclusively because of the multi display support plus its capacity to capture overlay canvases.
    But in a real 2-diplay build scenario it just won't work. I can't capture the main display.
    The MultiDisplayCameraCapture component briefly mentioned in the documentation won't help either.
    I'm using Unity 2021.3.21f1.
    Could you please provide some directions or a functional example on how to capture (including overlay) from multiple displays?
     
  33. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,
    To capture a specific screen in a multi display settings, place the MultiDisplayCameraCapture component on the camera game object you want to capture. If you simply want to capture the main display as it is, set the capture mode to FIXED_GAME_VIEW. There is nothing more to do and it should work out of the box. Do not hesitate if you still have any issue.
     
  34. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,

    I indeed recently changed the default capture format because it seemed to create issues on the last Unity version with HDRP.
    What is your Unity version and render pipeline ?

    Can you try editing the ScreenshotTaker.cs file, for the lines 1014 and 1023, replace ARGBHalf by ARGB32, and please tell me if the gamma is correct again.
     
  35. Sarchophagi

    Sarchophagi

    Joined:
    Nov 14, 2014
    Posts:
    5
    Thanks for the prompt reply but it's just not working. Always get this d3d11 error no matter what. According to the values here, the plugin is trying to ReadPixels from a display using the other display's resolution.

    Code (CSharp):
    1. [d3d11] attempting to readpixels outside of rendertexture bounds! Reading (0, 0, 540, 960) from (1280, 800)
     
  36. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Sorry for the delay, that seems to have fixed it.
    I'm on Universal RP 12.1.11 and Unity 2021.3.23f1
     
  37. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hey I just ran into another strange issue. I'm trying to take a screenshot while in AR.
    This is the code I'm using -
    Code (CSharp):
    1.  
    2. yield return StartCoroutine(SimpleScreenshotCapture.CaptureToFileCoroutine(photo.nameResult, 1024, 1024, TextureExporter.ImageFileFormat.PNG, 100, new List<Camera>{currentCamera}, null, ScreenshotTaker.CaptureMode.RENDER_TO_TEXTURE, 8, true, ScreenshotTaker.ColorFormat.RGB, false, false));
    If the camera has this component attached - Screenshot 2023-05-11 at 5.54.50 pm.png
    The image comes out as the whole screen squashed into a 1024 x 1024 square, but if I remove that component, the result is cropped.

    I'd like to get a cropped screenshot with that AR background, is that possible?

    Thanks!
    Pete

    Unity - 2021.3.23f1
    ARFoundation - Version 4.2.7 - November 07, 2022
     
  38. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hmmm, it seems to be related to this -
    Screenshot 2023-05-15 at 11.24.14 am.png
    But I need that to get the background to be in the screenshot. :(
    Any idea's on getting this one to work?
     
  39. tobphoto

    tobphoto

    Joined:
    Feb 22, 2019
    Posts:
    3
    Hello. Great Plugin, but it is not working in Unity 2022.3 sadly. I created a new HDRP project and import the package. When I built the application for Windows, there is an error in den Built window. Something like. Creating the player not possible while scripts are loading. But without the Ultimate Screenshot package, the built process works fine. It is an empty Unity project, that means no other packages influence the built process. There must be a problem with the package. Is this already on the list or is it a custom problem?
     
  40. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hi, here's an example of the problem I'm running into.

    This is what I'm seeing in app -

    IMG_2734.jpeg

    And this is how the capture appears.
    IMG_2733.jpeg

    Normally the capture would just crop but for some reason in AR it rescales. Any chance you could take a look at this?

    Thanks,
    Pete
     
  41. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    Hello. Fantastic asset! Is it possible to customize the canvas to show several screenshots in the same composition?
    Thank you!
     
  42. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello, and thanks.

    There is no currently build in solution in the asset to compose with multiple screenshots.

    Can you tell me more about your desired usage so I can see if there is a way to do it ? The current composer supposes that you want to take a screenshot of the current game view and then add it in a composition. What behavior would you require to take several screenshots ? You mean composing several previously taken screenshots, or screenshots of different cameras at the same time ?

    For instance, to take N screenshots and then compose them, you could have two screenshots managers:
    - one that simply create screenshots and save them in a folder
    - one with a custom canvas with several raw image UI elements, and using a preprocess that loads the N last screenshots in the folder and set the rawimage textures accordingly.
     
  43. junhan701502

    junhan701502

    Joined:
    Oct 30, 2017
    Posts:
    2
    Hello~

    I purchased the plugin and it runs successfully on Unity's WebGL platform!
    However, after capturing the photos and saving them to my phone's Gallery, I found that the photos can be saved successfully on Android but not on IOS.

    My settings is:
    Put "CutScreenshotProcess" and "ScreenshotManager" objects into the game scene.
    Capture Mode of ScreenshotManager is set to FIXED_GAME_VUEW.
    Select "Export to phone Gallery".
    Select "Picture_Folder" for Destination Folder.

    How can I adjust it to save the photos in the iPhone Gallery?

    https://drive.google.com/file/d/19JtSKN1jbWhfT_OdBEJO3A9UjJ_EmrgU/view?usp=sharing
     
  44. JuanMaldonado

    JuanMaldonado

    Joined:
    Oct 12, 2012
    Posts:
    30
    Hi @WildMageGames,
    Is it possible to capture an image with a transparent background using HDRP / Path Tracing?
     
  45. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    283
    Hello,
    Capturing transparent screenshots is possible with HDRP with the asset but with some specific constraints that can be limiting regarding your use case, notably disabling some environment settings. Please look the documentation FAQ 7.1.4 and 7.1.5
    -> www.wildmagegames.com/data/UltimateScreenshotCreator.pdf