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. Dismiss Notice

Feature Request Mouse cursor not visible in video, recorded using Unity Recorder

Discussion in 'Audio & Video' started by Only4gamers, May 18, 2022.

  1. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    301
    Hello everyone,
    Mouse cursor not visible in video, recorded using Unity Recorder. Is there any way to visible the cursor? Is this a bug or by design like this?
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    188
  3. madmansam

    madmansam

    Joined:
    Jun 4, 2023
    Posts:
    1
    A bit of necromancy, but in case anyone else has the same problem. Setting the cursor visible alone did not work for me.

    I had to add a texture for a cursor to the project, then select Edit -> Project Settings, select Player, then Default Cursor, click the empty box to the right, then select my cursor.

    Then I made a script called CursorShow and put it on an object in the scene. This cursor is just for the editor and just for recording.

    Code (CSharp):
    1. using UnityEngine;
    2. #if UNITY_EDITOR
    3. using UnityEditor;
    4. #endif
    5.  
    6. public class CursorShow : MonoBehaviour
    7. {
    8. #if UNITY_EDITOR
    9.     private void Start()
    10.     {
    11.         Cursor.visible = true;
    12.         Cursor.SetCursor(PlayerSettings.defaultCursor, Vector2.zero, CursorMode.ForceSoftware);
    13.     }
    14.  
    15. #endif
    16. }
    17.  
     
    Last edited: Jul 7, 2023
    Ryuuguu and Only4gamers like this.
  4. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    143
    Good tip for making sure default cursor is set in Player settings.
    Cannot make it work unfortunately. Once I set "CursorMode.ForceSoftware" I don't see cursor at all in the Game view. If changed to "CursorMode.Auto" I see my custom cursor, however it is still not recorded by Unity Recorder.