Forum rules - please read before posting.

Cursor disappears in windows build when a "Unity Ui prefab" Menu opens.

edited February 2019 in Technical Q&A

I have created a custom AC Menu with "Unity Ui prefab" as source. The menu works fine in Unity Editor but when I build my project to the windows platform and run the .exe file, the mouse pointer disappears when my menu opens.
Logically, the pointer is still there because I can somehow guess it's position and click the exit button in my menu but the cursor icon is invisible while the menu is On.

I'm guessing the problem is related to turning on/off AC in the menu's script. Since I don't want the player to be able to interact with hotspots or move around while the menu is On, I disable AC entirely when the menu gets enabled like this:

private void OnEnable()
{
    AC.KickStarter.TurnOffAC();
}
private void OnDisable()
{
    AC.KickStarter.TurnOnAC();
    AC.KickStarter.stateHandler.gameState = AC.GameState.Normal;
}

I've provided 3 screen shots to further clarify my issue:

My AC Menu settings:

My Menu prefab:

My cursor settings:

Does anyone know what might be the problem and what is the best solution to workaround this?
Thanks in advance.

Comments

  • Since you're rendering your cursors in Software mode, AC removes the system cursor and replaces it with its own. When you turn AC off, it's no longer rendering its own - but the system cursor is still hidden as well.

    Since your UI is linked to AC, disabling AC will also cause problems with the menu's functionality.

    You don't need to disable AC, however. The Engine: Manage systems Action, placed in ActionLists when the menu turns on and off, can be used to disable Movement and Interactivity.

  • Thanks Chris, using "Engine: Manage systems" instead of turning AC on/off solved the issue.

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.