Unity version: 2022.3.8f1
AC version: 1.81.3
So when I play my game in Unity via the Play Mode, it looks like this:
But when I make a build, it looks like this:
I'm seeing the following differences in the build:
Additionally, sometimes, the UI starts blinking, like this. It tends to do this when I alt-tab out of the game and come back, but sometimes it does that in-game at random points. It seems to stop when I enter a dialogue, but starts up again later:
Other times, the mouse cursor gets replaced by this weird, artifacted texture:
And other times, the cursor straight-up disappears.
One other bit of weirdness: at some point - this happened one time only - the cursor textures stopped appearing in Unity Play Mode. Relaunching Unity didn't fix it, but restarting my computer did.
We've been playtesting in person only due to the issues by using Play Mode, but we're getting to a point where we need to be running remote playtests. The cursor weirdness and blinking menu elements are kinda show-stoppers, and I'd be grateful for any help in figuring out how to approach even diagnosing the issue.
Here are screenshots of my cursor settings in AC, in case it's helpful: https://imgur.com/a/cV5D38z
And here's my latest custom interaction system code... I ended up simplifying it since last time FYI: https://ctxt.io/2/AADYE3koFg
Any help would be greatly appreciated... this one has me pretty stumped!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The Menu issue is likely to do with the difference in resolution / aspect ratio. Are you using Free Aspect mode when testing in the Editor? Best to rely on a fixed ratio e.g. 16:9. You can also enforce an aspect ratio in the Settings Manager if your art requires it.
AC Menus will stretch themselves to fit the size of the screen - there's not much control over how they adapt to different sizes/ratios, so I'd recommend switching them to Unity UI. The Canvas Scaler component gives you a lot more control over how Menus adapt to screen size.
Regarding the cursor textures: AC is set to use Software rendering, while your script relies on Cursor.SetCursor - which affects the system cursor. When Software rendering is used, AC hides the system cursor in builds.
I'd say you're best off relying on the Unity UI cursor option. With Animator parameters and transitions, its a lot easier to have a script affect the cursor's appearance without conflicting with AC's default behaviour. For example, AC can handle the cursor's default appearance in the Base layer, while your script can affect it through a sub-layer.
That may be to do with the "Texture type" of a particular cursor graphic asset.
If those UI elements are part of a Menu set to appear "During Gameplay", that behaviour typically occurs when a gameplay-blocking cutscene is run for a single frame.
You can try enabling the AC Status box at the bottom of the Settings Manager, which will display (in the top-left of the Game window) the name of any ActionLists that are currently running. If these don't need to block gameplay, you can set them to "Run In Background" to prevent this.
Belated response to say thank you for the help. I've implemented most of these suggestions already, and it's looking much better. Thank you!