Forum rules - please read before posting.

Selectively Changing Wait (Cutscene) cursor in script at runtime

Hi

I have a custom action. It does (and should) pause gameplay.
Because of this, no cursor appears.

For just this custom action, when gameplay is paused, I would like to use a custom cursor.

Changing the Cursor manager Cutscene cursor isn't an option as that would change it for all cutscenes. I want to selectivly have a wait cursor for just one cutscene.

I checked the docs, I feel like I must have missed it.

How should I approach this?

Note

  • Software cursor
  • Hack of AC.KickStarter.cursorManager.waitIcon.texture = AC.KickStarter.cursorManager.pointerIcon.texture; at the start of the action "works", but this changes the scriptable object so its like that subsequent playthroughs, which we dont want:)

Comments

  • Changing the Manager field at runtime is the way to go - but use the ReplaceTexture function rather than updating the texture directly.

    As it does indeed affect subsequent playthroughs, hook into the "Start game" event / ActionList to set things back to their intended default state. A tutorial covering this can be found here.

  • Thanks for the quick response, Ill try this. I missed the replace texture.

    (FWIW: That Start Game setting to defaults becasue a previous gameplay session might have changes an asset solution isn't ideal. I believe this means that any play of the game might change the cursor manager asset and modify the file. That file is under source control. With only one custom cursor its not (as) big a deal. If we had two though, it would alternate back and forth.
    That's confusing for artists/designers to have the game itself modify a file behind their back - they might then either commit to SVC it by mistake, or have it modified on their machine leading to conflicts.)

  • That's true - while you'll still want to do this to ensure builds work correctly, you can undo the change in the Editor upon exiting Play mode with EditorApplication.playModeStateChanged.

  • I didnt know about that event. Thank you!

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.