Hello!
I have set up my inventory objects to all have a Main Graphic that is an 2D Sprite of the inventory object. On top of this, I have added another 2D Sprite for the 'Active Graphic', and set the Active cursor FX to 'Pulse' in the Inventory Settings section of the Settings Manager. Everything works exactly as I was expecting, however the one issue I am encountering is that the 'Active Graphic' Sprite is being rendered behind the Main Graphic, which obscures most of it (example here: https://imgur.com/UIUeEys ) . I was wondering if there is a simple means by which to swap them, so that the Active Graphic still pulses, but just does so in front of the Main Graphic.
Apologies if this is something incredibly obvious, but I wanted to see if there was an easy answer before I started messing around with the code base or doing a bunch of potentially unnecessary Unity UI work
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @DigitalTchotchkes.
It's a good point. Currently, the active graphic is drawn first, and the regular graphic second - so you're quite right, this'll cause the former to appear underneath the latter.
This occurs at the bottom the PlayerCursor script's DrawActiveInventoryCursor function. Try replacing the final block with:
Does that cause it to then render as intended?
First off, thank you, Chris, happy to be here!
That did it!
I had to make a few changes to those lines to match the pre-existing ones (presumably due to not having updated my Adventure Creator install in a year or two lol), but it worked like a charm! Thank you so much, you have saved me a real headache, I greatly appreciate it!