Hey all,
I've been away from AC/Unity for a month or so now however I've actually taken a 6 month sabbatical off work to travel and I'm using a lot of my new free time to give game development a proper go so I'm hoping I can get my project back up and running again!
I've overcome a few hurdles to get back into the swing of things however I'm pulling my hair out with one of them. My system cursor and the game cursor are two different animals and never move in unison. I currently have two screens setup (with the game window dragged into the second screen) however whenever I play the build in the editor that system cursor is free to roam around everywhere and because the game cursor doesn't move 1:1 with my system cursor I can end up clicking off the game window screen.
Even when my system cursor is inside the boundaries of the game window the game seems to acknowledge only where the system cursor is and not the game cursor which is very annoying when trying to click on something! The system cursor is hidden when it enters the game window boundary (as it should - I have software rendering enabled for the cursor) so although the game hides the system cursor it takes instruction from it rather than the game cursor.
I have tried building the game however the same problem persists? Any advice at all, this must be a simple fix and something I'll likely feel stupid about missing when the solution is found/given. Thanks in advance.
p.s. Unity 2017.1.1f1 and AC 1.59e
Comments
Even if it seems unlikely to affect, it's important to temporarily remove any custom code so that it can be ruled out completely. Do the same issues occur when you switch to either of the demo games?
Any Manager field's API reference can be attained by right-clicking it's label. In the case of the Input method, it's:
AC.KickStarter.settingsManager.inputMethod
You can change this to InputMethod.MouseAndKeyboard or InputMethod.KeyboardOrController accordingly.
This can be incorporated into a custom Action if you want to easily set it as part of regular AC ActionLists.
Bear in mind that as this actually affects the asset file, changes may survive restarting the game - so you may want to run this code to set it to a default value in your game's ActionList on start game, which you can define in your Settings Manager.
For details on how to incorporate it into a custom option, see the "Options data" chapter in the Manual.
Actually, you bring up an important issue in that some of the options that appear in the Menu Manager when using Keyboard And Controller input (such as Directly-navigate Menus when paused?) have an effect regardless of whether or not the option is visible.
I'll have to look into it more thoroughly but I suspect this is a bug, as it doesn't sound right that you should have to clean all the First Selected Element fields if the Menu hasn't been configured to be directly navigated.
However, if the Input method is set to Keyboard And Controller, then an additional option to allow in-game (i.e. gameplay) menus appears in the Engine: Manage systems Action. This option is in an Action, as opposed to the Menu Manager like the others, because it's more likely you'd need to change it at runtime.
When and how exactly are you calling the Engine: Manage systems Action? Please provide a shot of that too if possible.
Correct me if I'm wrong, though, but it looks like the same code is running regardless of the variable's value.
The Inventory Menu also shows that no first-selected element is defined - though I'm assuming this is because, as you said, you're setting this dynamically based on the user's option.
I believe this issue is to do with the state of the game at the time the menu is opened. For an in-game menu to be controllable, the game must be in "gameplay" state at the exact moment it's turned on. If you're using ActionLists to turn it on, then they need their When running fields to be set to Run In Background. I recreated the issue following your shots, but resolved the issue when making that change.