Hello,
As adventure creator is mainly for adventure scenes (I do not want to rely on AC in menus or scene that do not require navigation nor interactions), we suffer cursor troubles when going in maps where AC is not present. We still appreciate the way AC handle the cursor (especially being compatible on many platforms).
And here what I think about cursors: a cursor is just a cursor, it has no mechanics, its mainly for the show.
So I thought; first of all, why isnt the cursor in persistent engine? It it is obviously not scene dependent, so alright I moved it to persistent engines, I knew this would cause a few mess there and there. StateHandler complains a lot, because it gets all of its reference from playerCursor, which is pretty much unexpected. So I had to change part of state handler too
GameObject persistentEngine = GameObject.FindWithTag(Tags.persistentEngine);
GameObject gameEngine = GameObject.FindWithTag(Tags.gameEngine);
playerCursor = persistentEngine.GetComponent<PlayerCursor>();
playerInput = gameEngine.GetComponent<PlayerInput>();
playerInteraction = gameEngine.GetComponent<PlayerInteraction>();
playerMovement = gameEngine.GetComponent<PlayerMovement>();
dialog = gameEngine.GetComponent<Dialog>();
There ! Way better. Yet I realize It relies heavily on PlayerInput for computing screen position of the cursor. I can't go further on, too many dependencies lies in PlayerInput, which prevent me from keeping a consistency in cursor across the whole game.
I have no choice but to provide a second system for handling cursor.
Also, as a final note, PlayerCursor does not care whether there are no cursors displayed once it get destroyed. So you might end up having no cursor at all if you leave adventure creator scenes.
Regards
Comments
As a technical aside, the PlayerCursor script is part of GameEngine because it does not store data that needs to survive scene changes. That's the key difference with the PersistentEngine - it only stores data that can't be left as a scene-based object.