Forum rules - please read before posting.

Custom Cursor Not Surviving Scene Switch

Hello!
We have a custom cursor for a specific scene in our game, when we run the scene directly it loads and works fine. But, if you access it from a different scene. we are using ACs PlayerCursor and it looks like its locked to the left bottom corner and doesn't follow the mouse. is AC doing anything during scene changes that might be causing that?

Comments

  • Is custom code involved?

    The PlayerCursor component is attached to the per-scene GameEngine object - when you switch scene, the game will rely on a separate PlayerCursor instance. If you're affecting it through script, you'll need to re-run the same code after a scene change.

    The cleanest way to do this is via the OnAfterChangeScene custom event, i.e.:

    private void OnEnable () { EventManager.OnAfterChangeScene += OnAfterChangeScene; }
    private void OnDisable () { EventManager.OnAfterChangeScene -= OnAfterChangeScene; }
    
    private void OnAfterChangeScene (LoadingGame loadingGame)
    {
        //
    }
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.