Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. 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:
    279
    Ultimate Screenshot Creator 1.8.1 has been released on the asset store :)

    1.8.1 - 09/01/2021
    • (NEW FEATURE) Exclude features from build depending on your needs.
    • Unity 2020.2 support.
    • Choose gallery order between name, creation date.
    • Added delegates to the thumbnail component.
    • Cleaned permission needs for iOS and Android.
    • Ratio names simplified.
    • (Fix) Share only works when folder exists.
    • (Fix) Stack overflow with render to texture.
    • (Fix) Export to Pictures folder for Android 10+.

    1.8.0 - 21/10/2020

    READ BEFORE UPDATING.
    Several files have been moved or removed in update 1.8. Because we added assembly files to improve compilation time, it is recommended to do a clean re-install by removing the AlmostEngine folder before importing the update, to prevent any compilation issues. Do not forget to backup your custom prefabs, presets, and configuration files (PhotoUsageDescription.asset, ScreenshotWindowConfig.asset) before doing so. Do not hesitate to contact me if you have any issues or questions.

    • (NEW FEATURE) Share your screenshots on iOS, Android and WebGL.
    • (NEW FEATURE) Can now choose to display or not the screenshot in the phone gallery.
    • (NEW FEATURE) New device presets selector, more intuitive and with a lot of filters.
    • (NEW FEATURE) You can now add tags to presets.
    • (NEW FEATURE) Easy one-click custom collections creation from device list.
    • (NEW FEATURE) API improved to allow capture of screen or camera from one line of code.
    • (Fix) Saving on Windows Store UWP.
    • (Fix) WebGL export on iOS.
    • Unity 2019.4 and 2020.1 support.
    • Asset now includes assembly files.
    • Minimal supported version is now 2017.4 LTS.
     
  2. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Ultimate Screenshot Creator 1.8.3 has been released on the asset store :)

    1.8.3 - 28/01/2021
    • (Fix) Export to pictures folder for Android 10.
     
  3. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello

    Indeed it looks like an issue with the NativeShare plugin.
    Can you tell me your Unity version, asset version, Xcode version ?

    Also, for a temporary fix, if you do not use the share feature you can exclude it from the build, using the install settings. Enable "exclude from build" and toggle off the "share".
     
  4. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    89
    Hello, I just bought your asset which seems awesome !!!

    I need to use Fixed Gameview mode as it should work on different devices and including the canvas and I have 3 questions (for now !)

    1. Capture only the camera viewport
    I am working on a game that must be displayed in 16:9 ratio. So depending on the screen resolution, I get black borders around the viewport with your asset, as you can see on these captures.

    My concern is that I would like to capture only the viewport (so without the black borders). Changing the Camera mode doesn’t change anything as I might have thought.

    2. I need small captures, 400 x 225 pixels would be enough, as these captures are only to monitor from time to time what is displayed on the gamer screen. As explained in your documentation, it is not possible to resize the capture in Fixed Gameview mode. Is there a way, instead of saving “immediately” the capture, to set it temporary as a texture variable (or a prefab) that I could then resize (and even rename), before saving it to the persistent folder or, even better, to a cloud folder ?

    3. As I am using PlayMaker, I am wondering if there are PM scripts for your asset ?

    Best regards, Phil
     
  5. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279

    Hello, and thanks for Purchasing Ultimate Screenshot Creator :)
    Sorry for the answer delay I have been very busy last days.

    1. Yes this is possible, using the ScreenshotCutter component.
    I just updated the asset to use the screenshot cutter as a process, I am sending it to you by private message.
    There is the example scene ScreenshotCutterExample to see how it works.
    You create a game object with a CutScreenshotProcess, and specify the RectTransform to use to cut the screenshot.
    Add the process to the "Batches/post process" list of your screenshot manager.

    2. It was not possible but I added it to the update I am sending to you.
    Add a ScreenshotResizeProcess to a gameobject and specify the size.
    Add the process to the "Batches/post process" list of your screenshot manager.

    If you just want the texture, you can call the ScreenshotManager UpdateAll() to only capture to textures, and then access the texture directly. See documentation faq 7.1.3

    3. Currently there is no PM scripts, is there something in particular you would be interested ?
     
    Philkrom likes this.
  6. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    89
    No problem !
    Great ! I'll try these features very soon !
    This is not urgent, but it could be great for the very large PM community users ! Adding a "Playmaker Actions" in the description and the PM logo on your asset would be much appreciated. I'll send you some needs.

    I answered with a PM too, but as I wrote it would be great to set the destination path as a global variable, so that I could access it with a PlayMaker script.

    Thanks a lot for your fantastic support !!!

    All the best, Phil
     
    WildMageGames likes this.
  7. vizgl

    vizgl

    Joined:
    Nov 4, 2014
    Posts:
    61
    Few suggestions:
    - support for new input system (in the class HotKey)
    - support to export screenshots to the project folder(not to Assets, but one level back)
     
  8. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Thanks for the suggestions.
    - I will look at it
    - this is already possible, select DATA_PATH mode and set "/../Screenshots/" , the "../" will go one level up, and it will be exported in the project folder
     
  9. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hello,

    Does this asset support Unity Cloud Build? This is because I got the follow error when I push my project into the cloud build:

    7: [Unity] -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/AlmostEngine.UltimateScreenshotCreator.Editor.dll
    8: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(119,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    9: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(226,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    10: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs(322,31): error CS0103: The name 'IconsUtils' does not exist in the current context
    11: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs(332,30): error CS0103: The name 'IconsUtils' does not exist in the current context
    12: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(397,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    13: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs(522,31): error CS0103: The name 'IconsUtils' does not exist in the current context
    14: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(805,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    15: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(940,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    16: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(976,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    17: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1000,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    18: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1032,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    19: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1163,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    20: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1186,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    21: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1258,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    22: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1394,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    23: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1508,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    24: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(119,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    25: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(226,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    26: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs(322,31): error CS0103: The name 'IconsUtils' does not exist in the current context
    27: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs(332,30): error CS0103: The name 'IconsUtils' does not exist in the current context
    28: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(397,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    29: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs(522,31): error CS0103: The name 'IconsUtils' does not exist in the current context
    30: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(805,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    31: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(940,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    32: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(976,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    33: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1000,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    34: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1032,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    35: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1163,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    36: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1186,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    37: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1258,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    38: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1394,25): error CS0103: The name 'IconsUtils' does not exist in the current context
    39: [Unity] Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs(1508,25): error CS0103: The name 'IconsUtils' does not exist in the current context
     
  10. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    I do not have Cloud Build but there should not be any issue.

    Can you check that :
    1. the file AlmostEngine/Shared/Assets/Editor/Scripts/IconsUtils.cs is included in your project. If not, try reimporting the asset.
    2. the assembly AlmostEngine/Shared/Assets/Editor/AlmostEngine.Shared.Editor is included, and set to "Editor only"
    3. the assembly AlmostEngine/UltimateScreenshotCreator/Assets/Editor/AlmostEngine.UltimateScreenshotCreator.Editor assembly is included, is set to "Editor only", and contains the reference to the AlmostEngine.Shared.Editor assembly
    4. Also, this is a strange error, because cloud build should not try to compile any of these assemblies, because they are Editor only assembly. Do you have a way to control what is compiled or not ? Maybe try moving AlmostEngine/UltimateScreenshotCreator/Assets/Editor and AlmostEngine/Shared/Assets/Editor/ to a Assets/Editor folder.
    5. Do you have any error when you try to build directly from the editor ?
     
  11. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    I think I have found my own answer, for some reasons IconsUtils.cs is not checked in to the repo, therefore this script was never in the repo. I am not sure why it got excluded in the first place. Sorry about this.
     
  12. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    No problems :)
     
  13. jadenutt

    jadenutt

    Joined:
    Jan 3, 2015
    Posts:
    2
    Hello, can I use this to take screenshots directly in the Scene interface of the editor, NOT THE GAMEMODE INTERFACE, that is to say, start taking pictures without pressing "Play" and entering the playmode. Also, if it is possible to do so, will the screenshots include the gizmos? I know you can hide all the gizmos, but the perspective bars on the top right will never go away, there is just no native option for it.
     
  14. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,

    Yes it is possible to capture in Editor mode without going in Play mode.

    You can capture what is visible on the gameview, but also from any camera within the scene.
    There is a tool button to "align the camera with the camera of the scene view" to capture from the scene windows point of view. No gizmo will be captured with this method.
     
    Last edited: May 17, 2021
  15. jadenutt

    jadenutt

    Joined:
    Jan 3, 2015
    Posts:
    2
    Thank you so much! That's exactly what I need!
     
    WildMageGames likes this.
  16. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    99
    Hello, I want to take pictures of specific game objects without anything else in output. Is there a way I can do this with Screensot Creator? Would one approach be to relocate the specific object to somewhere alone off screen and then take an offscreen picture of it?
     
  17. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,

    I am not sure to clearly understand your request, I will try to answer it but do not hesitate to give me more details. It depends if you want to capture objects manually in edit mode(1), or if you are speaking about capturing any object from the scene but isolated (2).

    (1) There are several way to do it. In the examples scenes, you will find the OffscreenRenderingExample, where an object located outside the main camera view is captured. The objects and the camera are in a distant location and the camera is only used for the capture. Instead of moving the object, you can also set the layer of that object to a specific unique layer and set the capture camera to only capture that layer.

    (2) It is possible, but there is no automatic way to do it. (but I am looking at adding this feature because there were several demands for it) You could have script that, before capturing an object, move it or duplicate it to a specific distant location, where the capture camera is already located, and capture using the camera mode and render_to_texture mode like in the OffscreenRenderingExample. One way to do it could be to have a "pre process script" that will automatically move the object before capturing it, and then move it back (or destroy the copy) after the capture.
     
  18. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    You are welcome :)
     
  19. P3ndragonLLC

    P3ndragonLLC

    Joined:
    Sep 19, 2019
    Posts:
    99
    @WildMageGames Thanks!

    #1 should work for me, I'm not sure yet if layer or offscreen will be the better approach for automating, but they both sound like a good solution for what I'm trying to accomplish.

    #2 would be really nice to have, so you can add me to the list of people asking for it :)

    Best regards,
    Scott
     
    WildMageGames likes this.
  20. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,447
    Awesome asset, I would like to capture screen shots during runtime. I'm currently using unity's built in screen capture function and it creates a big lag on mobile. Is your capture solution faster than unity's and is it running on separate threads?
     
  21. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    188
    I broke it :)

    Just bought it and I managed to break it before taking my first picture. It's easy to repro, and therefore I assume is easy to fix too...

    Simply put it into Burst Mode and you will get the following error:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.EditorGUILayout.IsChildrenIncluded (UnityEditor.SerializedProperty prop) (at <208995a09fe148f5a6f6c571838c154f>:0)
    3. UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at <208995a09fe148f5a6f6c571838c154f>:0)
    4. AlmostEngine.Screenshot.ScreenshotConfigDrawer.DrawCaptureGUI () (at Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotConfigDrawer.cs:1127)
    5. AlmostEngine.Screenshot.ScreenshotWindow.DrawConfig () (at Assets/AlmostEngine/UltimateScreenshotCreator/Assets/Editor/Scripts/ScreenshotWindow.cs:263)
    After that the UI will not respond to any changes. You can get out of this situation by commenting out the offending line. Of course this means burst mode is unlikely to work as expected but I'm sure the publisher can resolve that in a near future update.

    Let me know if this doesn't repro for you as I was playing with many settings before making that change. Happy to try to nail down the repro with you.
     
    WildMageGames likes this.
  22. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,

    Ultimate Screenshot Creator provides a "capture gameview" mode that is the fastest way to capture a screenshot, there should not be a FPS drop, but this also depends on the platform and device used, so I can not tell about fps drop on old devices. The capture is not using a separate thread as it needs to synchronize after the game update to capture its content.
     
  23. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello

    Sorry there was a typo in the last update and that created that editor error. I am pushing an update. To fix it right now, in ScreenshotConfigDrawer.cs, edit line 91, replace "m_ShotTimeStep" by "m_ShotPerSeconds".
     
    SorraTheOrc likes this.
  24. GS796

    GS796

    Joined:
    Dec 16, 2016
    Posts:
    24
    Hi @WildMageGames

    For taking screenshots for the app stores I have a list of the resolutions I need and take all 5 shots at once which works great. Some screens (like iPhone 6.5) need to respect the safe area, while others don't. Currently there doesn't seem to be a way to toggle on safe area when taking screenshots in the Editor for a given Resolution preset. Maybe I am missing a way to do this. I do have the full package with Universal device preview- if that makes a difference- but I am just using the screen capture setup.
    Thanks for the help.
     
  25. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello
    Currently there is no toggle button to disable the safe area for a specific preset.
    However, you can edit its properties and set all SafeArea values to zero to disable it ("exand device settigns" in the settings window.)
    You can save that preset as a custom preset to keep it, you can also add the original preset to get both captures with safe area or not.
     
  26. alishafiei

    alishafiei

    Joined:
    Sep 15, 2020
    Posts:
    3
    Hello,
    I've been using this plugin and I really like everything about it, just have a question.

    - How can I set the share title and description, currently its set to something like "Look at this nice screenshot.".

    Thanks!
     
    Last edited: Oct 1, 2021
  27. Birdy-Bird

    Birdy-Bird

    Joined:
    Apr 18, 2021
    Posts:
    20
    I'm working on a topdown pixel art game with 32x32 tiles. How do I take pixel perfect screenshots? For instance, I want to take a screenshot of an area in my scene that's 10 tiles tall and 8 tiles across (320x256). It seems like I can't do this without playing with the camera projection size when using GAME_VIEW camera mode, and I'm not sure how to set up a custom camera to handle this.
     
  28. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello, the new update allows to customize that message :)
     
  29. lorewap3

    lorewap3

    Joined:
    Jun 24, 2020
    Posts:
    58
    Hi @WildMageGames ,

    I purchased your asset a few days ago and at first was quite impressed by all the features available. However, I'm having a really hard time doing something that seems like it would be extremely simple to do.

    I use alot of custom editor windows to manage assets. One of these windows manages particle system prefabs. I have a ScriptableObject type (I call Emitter) to contain metadata and usage info on the particle systems. Here's the basic window.
    upload_2021-12-27_13-16-0.png

    Each 'Emitter' has an Texture2D 'Icon' field that is intended to hold a captured screenshot of the particle system in action. Since most of the capture methods in your asset rely on coroutines, I created an editor coroutine to take a snapshot of the current game view to use as the particle system's icon. That's the 'Capture Icon' button at the top. When you click 'Capture Icon', it starts a coroutine to capture a snapshot and once it's saved assign it back to the SO in the Icon field.

    The editor is never in play mode, only in edit mode. I am simply playing the particle systems in a relatively blank scene and capturing screenshots while the particle systems are playing and use that as the icon. Pretty simple stuff I thought.

    But I have spent so many hours trying to just do this simple task. Here's the editor window coroutine:

    Code (CSharp):
    1. private IEnumerator QueueCaptureIcon()
    2. {
    3.     // If another coroutine already in progress, abort
    4.     if (CoroutinesInProgress.Count > 0)
    5.     {
    6.         Debug.Log("Previous coroutine in progress, please wait. ");
    7.         yield return true;
    8.     }
    9.  
    10.     // Get selected emitter
    11.     List<Emitter> emitterList = this.MenuTree.Selection.RefineMenuTreeSelection(typeof(Emitter)).GetSelectionValues<Emitter>();
    12.     if (emitterList.Count <= 0)
    13.         yield return true;
    14.     Emitter emitter = emitterList.First();
    15.  
    16.     // Get main camera
    17.     List<Camera> cameras = new List<Camera>();
    18.     cameras.Add(Camera.main);
    19.  
    20.     // Set Camera bg color as dark theme bg color.
    21.     prevCameraBGColor = Camera.main.backgroundColor;
    22.     Camera.main.backgroundColor = EditorUtils.darkThemeBGColor;
    23.  
    24.     // Texture path
    25.     string iconPath = AssetDatabase.GetAssetPath(emitter.Icon);
    26.     //AssetDatabase.DeleteAsset(iconPath);
    27.     //EditorUtility.SetDirty(emitter);
    28.     //AssetDatabase.SaveAssets();
    29.     //AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
    30.  
    31.     IEnumerator captureToFileCoroutine = SimpleScreenshotCapture.CaptureToFileCoroutine(
    32.                     iconPath, OG.Instance.emitterIconTextureWidth, OG.Instance.emitterIconTextureHeight,
    33.                     TextureExporter.ImageFileFormat.PNG, 100, cameras, null,
    34.                     ScreenshotTaker.CaptureMode.GAMEVIEW_RESIZING, 0, false, ScreenshotTaker.ColorFormat.RGBA, false);
    35.  
    36.     // Note: Doing it without a coroutine means I won't know when it's finished saving.
    37.     //SimpleScreenshotCapture.CaptureToFile(iconPath, emitter.Icon.width, emitter.Icon.height,
    38.     //    TextureExporter.ImageFileFormat.PNG, 100, cameras, null, ScreenshotTaker.CaptureMode.GAMEVIEW_RESIZING,
    39.     //    0, false, ScreenshotTaker.ColorFormat.RGBA, false);
    40.            
    41.     bool captureFinished;
    42.     do
    43.     {
    44.         yield return null;
    45.         captureFinished = !captureToFileCoroutine.MoveNext();
    46.     } while (!captureFinished);
    47.  
    48.     // Set Camera bg color back to original color
    49.     Camera.main.backgroundColor = prevCameraBGColor;
    50.            
    51.     //if (TextureExporter.ExportToFile(emitter.Icon, iconPath, TextureExporter.ImageFileFormat.PNG, 100, false))
    52.     //    Debug.Log("Icon texture saved successfully! [" + iconPath + "]");
    53.     //else
    54.     //    Debug.Log("Icon texture failed to save...");
    55.  
    56.     // Force save texture
    57.     AssetDatabase.SaveAssets();
    58.     AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
    59.  
    60.     yield return new WaitForSeconds(3);
    61.  
    62.     //while (AssetDatabase.FindAssets("t:Texture2D " + emitter.name + "_Icon", new string[] { OG.Instance.emitterStagedIconPath }).Length <= 0)
    63.     //    yield return null;
    64.     string guid = AssetDatabase.FindAssets("t:Texture2D " + emitter.name + "_Icon", new string[] { OG.Instance.emitterStagedIconPath }).First();
    65.  
    66.     // Reload texture and set as emitter icon.
    67.     emitter.Icon = AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath(guid));
    68.  
    69.     // Force save texture and update SO
    70.     EditorUtility.SetDirty(emitter);
    71.     AssetDatabase.SaveAssets();
    72.     AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
    73.  
    74.     yield return true;
    75. }
    I left alot of my comments in there to show you what I've tried. To be fair, this code does 'appear' to create the snapshot, at least at first. But there are VERY weird behavior that just does not make logical sense.

    1) The very first capture I take creates a texture asset as expected. However, every single capture after that uses the exact same texture. It's not taking a new capture at all. It's just saving what's already in ScreenshotTaker as yet another texture asset. I don't understand this behavior at all. Why would it do this? I get that the code for actually taking the captures is in ScreenshotTaker so it must use that component. But do I really have to go in and clear out the texture in ScreenshotTaker before I take another? What is the reason for that? I didn't want to have to store a reference to the ScreenshotTaker that's loaded in the scene in my editor window. That was the whole point of using the SimpleScreenshotCapture singleton.

    2) This is more just an annoyance, but I added this code to the InitScreenshotTaker function at the top of SimpleScreenshotCapture.cs file:
    Code (CSharp):
    1. /// Use ScreenshotTaker found in scene before creating a dummy GO
    2. m_ScreenshotTaker = Component.FindObjectOfType<ScreenshotTaker>();
    3. if (m_ScreenshotTaker == null)
    4. {
    5.     GameObject go = new GameObject();
    6.     go.name = "tmp Screenshot Capture";
    7.     go.hideFlags = HideFlags.DontSave;
    8.     m_ScreenshotTaker = go.AddComponent<ScreenshotTaker>();
    9. }
    10.  
    It was extremely annoying having to delete the temporary gameobject it kept adding to the scene everytime it took a capture. I put the ScreenshotManager prefab in the scene I would've assumed it would've just found the ScreenshotTaker component already in the scene before adding another one.

    3) The SO Icon variable references aren't retaining when I reload Unity. It's likely this is ignorance on my part, but I just don't understand why the texture reference isn't being saved when re-opening unity. You can see from my coroutine above that I do a capture to the texture, then save/reimport assets, and then eventually reload it back into the Icon field. Then I set it dirty and save/reimport yet again just to be safe. But everytime I reload unity the texture assets themselves are still there (although not necessary 'real' captures because of issue #1), the Icon field is blank again. I can't figure out what I'm doing wrong.

    Any advice/suggestions you have are most appreciated! I apologize if I come across as a little frustrated I've just spent so much time now trying to figure out what I thought would be fairly simple. Take a capture, assign the texture back to a field in an SO. That's it. I feel so dumb that I can't figure this out.

    I really appreciate any assistance! I hope you had a great holiday!
    Thanks,
    Will
     
  30. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279

    Hello

    This is an interesting use of the asset :)

    1/ The "CaptureToFile" coroutine will capture to the same texture for each call, indeed, because the goal of that method is to export to a file. What should be unique is the newly created "image asset" file, and this is the asset that should be referenced as the particle icon path, the texture object is only temporary.
    I do not see an obvious issue with your code, but you should check :
    - that you create, for each icon, a unique icon file. Maybe in a first time try to create completely new files not related to the icon path, just for debug purpose, to see if all files are correctly created.
    - that you attribute that unique asset file to your emitter object.

    2/ The screenshot taker is temporary and will be automatically removed (flagged as DontSave) but indeed with that kind of use if could appear more than one time in your hierarchy. I will improve that.

    3/ You should probably use the EditorUtility.SetDirty( ...) to flag your object as edited so it will be saved.
     
  31. lorewap3

    lorewap3

    Joined:
    Jun 24, 2020
    Posts:
    58
    Thanks for the info! I ended up using ScreenshotTaker, but creating a texture only and doing the file save manually.
    Code (CSharp):
    1. private IEnumerator QueueCaptureIcon()
    2. {
    3.     if (CoroutinesInProgress.Count > 0)
    4.     {
    5.         Debug.Log("Previous coroutine in progress, please wait. ");
    6.         yield return true;
    7.     }
    8.  
    9.     List<Emitter> emitterList = this.MenuTree.Selection.RefineMenuTreeSelection(typeof(Emitter)).GetSelectionValues<Emitter>();
    10.     if (emitterList.Count <= 0)
    11.         yield return true;
    12.  
    13.     Emitter emitter = emitterList.First();
    14.  
    15.     // Get main camera
    16.     List<Camera> cameras = new List<Camera>();
    17.     cameras.Add(Camera.main);
    18.  
    19.     // Set Camera bg color as dark theme bg color.
    20.     prevCameraBGColor = Camera.main.backgroundColor;
    21.     Camera.main.backgroundColor = EditorUtils.darkThemeBGColor;
    22.  
    23.     Texture2D ssTexture = ScreenshotTaker.CaptureCamerasToTexture(OG.Instance.emitterIconTextureWidth,
    24.         OG.Instance.emitterIconTextureHeight, cameras, ScreenshotTaker.ColorFormat.RGBA);
    25.  
    26.     // Set Camera bg color back to original color
    27.     Camera.main.backgroundColor = prevCameraBGColor;
    28.  
    29.     // Texture path
    30.     string iconPath = AssetDatabase.GetAssetPath(emitter.Icon);
    31.  
    32.     // Pause autofresh until texture created and re-imported
    33.     AssetDatabase.DisallowAutoRefresh();
    34.  
    35.     // Delete old texture
    36.     AssetDatabase.DeleteAsset(iconPath);
    37.  
    38.     string newIconPath = AssetDatabase.GenerateUniqueAssetPath(iconPath);
    39.     File.WriteAllBytes(newIconPath, ssTexture.EncodeToPNG());
    40.  
    41.     // Refresh to import newly created texture
    42.     AssetDatabase.Refresh();
    43.  
    44.     // Reload texture and set as emitter icon.
    45.     emitter.Icon = AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
    46.  
    47.     // Mark new texture in SO dirty
    48.     EditorUtility.SetDirty(emitter.Icon);
    49.  
    50.     // Force save texture and update SO
    51.     AssetDatabase.SaveAssets();
    52.     AssetDatabase.Refresh();
    53.  
    54.     // Re-enable auto refresh
    55.     AssetDatabase.AllowAutoRefresh();
    56.  
    57.     // Save all loaded scenes;
    58.     EditorUtils.SaveAllLoadedScenes();
    59.  
    60.     yield return true;
    61. }
    I can't claim I figured this out myself, though. It took resurrecting an old thread and asking help from some other guys who've had similar issues: https://forum.unity.com/threads/in-editor-update-material-and-save-it-to-disk.546519/

    Thanks again for your help,
    Will
     
  32. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279

    I'm glad you find a solution.
    I will look what I can do to improve that kind of capture workflow - it should have worked with your previous code, I will look what could have gone wrong.
     
  33. Masashi-Wada

    Masashi-Wada

    Joined:
    Jul 6, 2010
    Posts:
    80
    Hi,
    I see the script getting a compile error after updating to 1.9.6. I didn't see this at 1.9.5.

    Assets\AlmostEngine\Shared\Assets\Scripts\CameraController.cs(6,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
    Assets\AlmostEngine\Shared\Assets\Scripts\HotKey.cs(5,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
    Assets\AlmostEngine\Shared\Examples\Scripts\AutoSwitchToNewInputSystem.cs(7,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
    Assets\AlmostEngine\Shared\Assets\Scripts\CameraController.cs(27,28): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
    Assets\AlmostEngine\Shared\Assets\Scripts\HotKey.cs(19,22): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Unity 2020.3.25 (windows)
    Android platform
     
  34. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello

    All those errors seem to be related to the new input system support, these errors are all within the "USC_INPUT_SYSTEM" symbol.
    Did you enabled the new input system for the asset by clicking on, but disabled the unity input system package ?
    If you are not using the new input system, go in the Player Settings, Other Settings, Configuration, and within the Scripting Define Symbol remove the USC_INPUT_SYSTEM symbol.
     
  35. Masashi-Wada

    Masashi-Wada

    Joined:
    Jul 6, 2010
    Posts:
    80
    Hi, thank you for your support.

    I'm still using the New Input System and it works in other scripts.

    1. Added the New Input System package (1.2.0).
    2. I have installed ULTIMATE SCREENSHOT CREATOR (1.9.5)
    3. Now I have added USC_INPUT_SYSTEM to define, but at that time I may have seen the error and manually added it to Project Settings. I'm sorry. I forgot this.
    4. Deleted the AlmostEngine directory in 1.9.5.
    5. Imported 1.9.6
    6. I saw an error, so I downgraded (git / hard reset) to 1.9.5. The packages depend haven't changed.

    It turns out that these steps can also be seen in new projects. I may not be confused if the documentation provides official information on using the New Input System.
     
  36. Abo7mood

    Abo7mood

    Joined:
    Jun 3, 2020
    Posts:
    2
    hi, I wanna to make a capture without press on the green button by programming , I have another script , and I wanna to make a function to take a capture (green button) without press it , so for example

    if(Input.GetKeyDown(KeyCode.W))
    ScreenShot.Capture();

    this 2 lines of code I write it with mobile just to make everything clear

    I hope someone answer me , thanks
     

    Attached Files:

  37. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    In theory, if you have the new input system package installed and enabled in the project settings, there should be no error. Thanks a lot for that feedback, I will try to reproduce your issue following your process to see what could go wrong.
     
  38. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,

    If you add a reference to the ScreenshotManager compontent in your script,
    for instance with a public field:
    public ScreenshotManager m_ScreenshotManager;

    Then use the inspector to configure your monobehavior script to reference the screenshot manager in your scene,
    and then call the capture method:
    m_ScreenshotManager.Capture();


    If you are not using a monobehaviour and can not reference the manager from the inspector, you can also search for it, for instance using the
    GameObject.FindObjectOfType<ScreenshotManager>
     
  39. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello

    I was not able to reproduce your issue on Unity 2020.3 following your steps.

    - With the Input System 1.2 added to the project, I never have any error, independently of having the Ultimate Screenshot Manager new input system support enabled (with USC_INPUT_SYSTEM added or not in player settings).

    - Only way I get an error is removing the new input system package from the project while keeping the "new input system" selected and having the USC_INPUT_SYSTEM defined. In that case the asset looks for the input system scripts from the package that have been removed.

    -> I will look what I can do in case the input system package is removed but still enabled for the screenshot asset to prevent any errors.

    -> You should get the asset working with the new input system without any issue by checking that the new input system package is installed, the "New input system" selected in player settings, and USC_INPUT_SYSTEM defined.

    -> When you remove the input system, just remove USC_INPUT_SYSTEM from the symbols. I will add that to the documentation.
     
  40. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    89
    Hello
    I would like to record screen captures with high resolution (2K o r even 4K) in a good quality to make a video with another software (DaVinci Resolve or Premiere). This is what the Unity recorder does but it seems that it can only be used within the editor, not launched by a script during the game launched. Of course, the app might play frame by frame during the capture. I didn't find any asset to do this, some propose screen recording but not in desktop platforms and I am wondering if your (awesome) asset could do this, capture 1st frame, go to next frame, capture 2nd frame and so until a command that would stop the recording.
    Best regards, Philippe
     
    Last edited: Jan 23, 2022
  41. RobotFlow

    RobotFlow

    Joined:
    Aug 11, 2020
    Posts:
    26
    Hi, is there a way not to add the watermark of logo and copyright on the captured images?
     
  42. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,
    Yes, go to the OVERLAYS section and toggle OFF the example watermark canvas.
     
  43. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello
    After testing the current feature can not do it - you would need to code yourself the pause/restore time and call to capture.
    However, the current burst mode should be able to do it, so I started editing it to enable such feature.
     
  44. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,
    I just updated the package (should be available in a few hours on the asset store).

    Now the burst mode has a fixed framerate feature to enable exactly what you ask. I tried it to capture 4K screenshots at a fixed 60FPS and it works great.

    To use it, set the capture mode to burst, set fixed framerate to true, set your framerate and maximum frames to capture, and check that the "stop time to capture" is true in the utils section. When you call the capture() method you will start the burst process that will capture at a fixed framerate. Call StopBurst() to stop it.

    Do not hesitate to ask if you have any question or issue.
     
  45. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    89
    Fantastic ! I try this new feature as soon as the package is available.
    Merci Beaucoup !
    Philippe
     
  46. PRfsJay

    PRfsJay

    Joined:
    Apr 22, 2021
    Posts:
    15
    Good Morning.
    I would like to know if this asset could be used to make a camera inside a VR game that would take pictures. I am attempting to make a camera object for a VR museum. I would like the camera to take a picture but save it as a screenshot. I am unsure how this would work, can this be added to a game object and use a button with a unity event to take a picture?
    Thank you for your kind attention and consideration.
     
  47. Denchi_

    Denchi_

    Joined:
    Dec 17, 2018
    Posts:
    23
    Hey!
    First of all, thanks for the great asset. Been using it for a while and it's working like a charm.

    There's only one issue that my users report from time to time. My app allows users to take screenshots of their character in the game with a transparent background, so only the character shows up in the screenshot and the rest of the image is transparent. The character may have blurry/semi-transparent outlines of any color.

    The problem is that when I save a screenshot of the main camera that renders the character, that outline will be mixed with the background-color of the camera (for example transparent white), which results in a slightly white outline as the outline color is mixed with the (transparent) background color. What would solve this is RGB-channel padding, something like this process: https://docs.unity3d.com/462/Documentation/Manual/HOWTO-alphamaps.html

    Would be cool if something like that could make it into the asset eventually.

    Cheers,
    Denchi
     
  48. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,
    Sorry for the long delay, I missed the forum notifications.
    Yes, the asset would work for that. You can add a ScreenshotManager to be simply called. The asset contains features to load saved pictures from file, that you could use in the gallery. Do not hesitate to reach me by email if you are still interested and want to know more.
     
  49. WildMageGames

    WildMageGames

    Joined:
    Mar 24, 2014
    Posts:
    279
    Hello,
    Sorry for the long delay, I missed the forum notifications.
    I would recommand using a black background, because in my experience it's the one that add the less color mixing with the elements. Thanks for pointing me that alpha map documentation, I will study that solution to see if the transparent capture can be improved.
     
  50. nemeth-regime

    nemeth-regime

    Joined:
    Feb 13, 2017
    Posts:
    40
    Hey, is it possible to create a scrolling screenshot with this asset? So capture the full content of a scrollrect, even the parts that are off screen?