Forum rules - please read before posting.

main cursor changes only when game is paused

Hello, i have a Unity UI menu which i linked to adventure creator to manage. The menu opens and works fine. i have set a walking cursor and a main cursor. i want the walk cursor to change to main cursor when i open the menu without pausing the game. But it changes only when "Pause game when menu enabled" is ticked. The main cursor is set to display cursor always. if i remove the walk cursor then the main cursor works fine. i also use UFPS for my character, the character works fine, i also added the ufps intergration script (if this information helps). is that a bug or something i did wrong?

Comments

  • Neither - if you aren't pausing the game, then AC won't know that you want the cursor to change.

    You can have the walk cursor removed by altering the Cursor Manager's Provide walk cursor? checkbox through script.  If you right-click on the field's label, you'll get a link to its API reference:

    AC.KickStarter.cursorManager.allowWalkCursor

    Simply set this to False when your Menu opens, and True when it closes.  You can do this by creating a custom Action, having the custom Action set the value to True or False, and running it in your Menu's ActionList when turn on / ActionList when turn off assets.

    Alternatively, you could write a script with two functions that set it explicitly, i.e.:

    public void ShowWalkCursor ()
    {
      AC.KickStarter.cursorManager.allowWalkCursor = true;
    }

    public void HideWalkCursor ()
    {
      AC.KickStarter.cursorManager.allowWalkCursor = false;
    }


    And then call these functions with an Object: Send message Action.
  • Thanks so much Chris for your response, i took your advice and created a new custom action.
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.