Search Unity

Question Unity recorder and UI Text components

Discussion in 'Audio & Video' started by xrm0, Sep 16, 2021.

  1. xrm0

    xrm0

    Joined:
    Feb 26, 2013
    Posts:
    86
    I've been using the Unity Recorder to create small videos of gameplay from within the editor for some time without any problems.
    Yesterday I added some ui components to the game and recorded a video, but found that the Text components are not appearing in the video recorder (nor the game editor tab when recording). Other ui components such as images and panels are visible.
    When not using the recorder, the text appears ok.
    Any ideas on how to solve this?
    I'm using Unity 2021.x and Uniy Recorder 2.5 installed from the package manager. I've found a similar bug from 2017 (not saying it's the same) , back when unity recorder was on github. It was solved in 0.02, don't know whether it's related https://github.com/Unity-Technologies/GenericFrameRecorder/issues/11
     
  2. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
    Hello, I am going to investigate this issue. Here are a few questions:
    * Which Render Pipeline are you using?
    * Which package are you using for building your UI? I'm guessing this is Unity UI @ 1.0.0
    * Can you please share a screenshot of your Recorder settings? I assume you're recording the GameView.

    Also, we released 4.0.0-pre.1 recently, you should upgrade :)

    I just tried in 2021.1.15f1 with Recorder@4.0.0-pre.1 and I can see my text in the export, both images and movies (WYSIWYG, if it shows up in the GameView you should see it in the export).

    Can you try a very simple canvas setup like mine?
    upload_2021-9-16_9-39-1.png

    upload_2021-9-16_9-39-24.png

    upload_2021-9-16_9-39-51.png
     
  3. xrm0

    xrm0

    Joined:
    Feb 26, 2013
    Posts:
    86
    I'm using the builtin render pipeline, unity 2021.1.15f1, unity ui 1.0.0, and recorder 2.5.5.
    Unity recorder 4.0.0-pre.1 looks like only supports HDRP? I don't think I'll be able to update to that version in this particular project.

    Later today I'll create a setup like you did and test it.
    Thanks
     
  4. xrm0

    xrm0

    Joined:
    Feb 26, 2013
    Posts:
    86
    Found the problem, it's not related to Unity Recorder.
    I'm recording with an "output resolution" different than "Match window size". So, when Unity Recorder starts, it changes the game windows size -> changes aspect ratio -> the ui elements disappear.
    Changing "output resolution" to "Match window size" works.

    So, it's something in my code (haven't solved it yet!).
    Thanks
     
    unitybru likes this.
  5. unitybru

    unitybru

    Unity Technologies

    Joined:
    Jan 28, 2020
    Posts:
    225
    FYI Recorder never "only" supports HDRP. It works for all render pipelines, it's just that some features are only available with HDRP > version X.Y.Z. (namely AOV recorders).
     
    xrm0 likes this.
  6. xrm0

    xrm0

    Joined:
    Feb 26, 2013
    Posts:
    86
    Great!
     
  7. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    Had something similar today with Recorder in 2020LTS. It's fully down to the bad design of Canvas and how it adapts to different resolutions - any UnityUI element or layout that had a 'size' will break when Recorder switches resolution (Canvas only works correctly on resolution changes if everything had 0 size and was fully dynamically resized to fit parent object).

    Best approach is to discard/bypass/ignore CanvasScaler and write your own solution that works sanely and sensibly for resolution changes, and then these problems go away (used to be some open-source ones floating around).

    TL;DR: Recorder isn't at fault here, it merely shines a light on Canvas's poor design.
     
    xrm0 likes this.