Forum rules - please read before posting.

Change cursor settings in game options

Hello Chris,
it's possible to change "Main Cursor Setting" mode via script in game options ?
I tryed with this script in Update() function, but don't works...

if (cursore == 0)
           AC.CursorManager.cursorDisplay = CursorDisplay.OnlyWhenPaused;
if (cursore == 1)
          AC.CursorManager.cursorDisplay = CursorDisplay.Always;

where "cursore" it's my change variable. Script it's attached to PersistentEngine prefab of the game

Unity gives me this error:
Assets/MyOptions.cs(66,29): error CS0120: An object reference is required to access non-static member `AC.CursorManager.cursorDisplay'

Hope you can help me to understand where i wrong...
Thanks

Comments

  • Please see the latest Manual's section on Custom Scripting, as well as the front page of the Scripting Guide for details on how to reference AC's scripts.

    To reference the Cursor Manager, you use:

    AC.KickStarter.cursorManager

    You can also right-click the label of any field in the Managers to get an API reference to change it through script.
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.