Hey guys, this is probably more of a unity question but it is part of my AC verb window.
I've got a makeup compact animation that flips up and has 4 verbs inside it.
The center of the compact animation is transparent. Behind that is a single image of
a makeup palette.
Ive got the first of 5 frames set as its own animation (called idle) and in animator
-> TriggerOpen and TriggerClose back to idle. This is all a prefab
The problem being that i have to turn off raycast for the compact image or it block
buttons for the verbs from being pressed.
I've tried putting a transparent image ontop of compact with a MouseEnter that
triggers open. Then ive tried actionlist to close that image until MouseOff with actionlist
AC didnt like that- being linked to a prefab yet it still worked for mouseEnter.
But not mouseExit.
Next i tried putting the transparent image in the very back layer and larger than my
compact image with the same triggers. Now it opens the animation when i get
close to thr compact image but when i get inside the compact image it gets treated
like mouseOff because compact is infront of the transparent image.
Im excited to get past the UI of this project so i can mostly stick to AC and get to
the puzzles and main artwork.
Any advice? Im probably going to need a script with an event in the animation window but
I was hoping to avoid that.
Heres a video i made yesterday so you can get a better idea. Compact openes fine
but verb icons couldnt be pressed. Then when i turned off raycast target on the compact
I could finally press the buttons but thr compact itself was no longer opening.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Ive pretty much got it figured out now. I see that hitting record button on animation allows you to look at your image in inspector and go frame by frame and uncheck raycast. That alone wasnt enough for me though, i did end up using a little script and some bools to get it working right. Im brand new, slowly figuring it out with the help of chatgpt,which isnt perfect by any means but a good place to start-even if it takes a ton if trial and error.
Just kidding, its janky and now getting more complicated scripting, which i wanted to avoid.
Welcome to the community, @mapsandcaps.
You can prevent UI elements from being interactable by attaching a Canvas Group component to their parent.
This component's Interactable field can be controlled through animation. You will, however, need to move your Animator (and re-do the opening animation) to a parent object shared by both the Canvas Group and your Compact - CompactPanel in this case.
As usual, it was some simple error on my part, though i dont remember how exactly i solved that problem. Had a lot of hiccups with mouseEnter and MouseExit and decided to just put a panel outside the verb UI compact for a different mouseEnter that closed the compact. But now ive decided to go with hotspot and then verb because I think the monkey island 3 design would ultimately work better for me than the monkey island 1 and 2 verb then hotspot design.
Ive got my first scene loaded up though and im really happy with it so far! I'll post an update when i've got a workable demo of the first level. Im so thrilled. Still using Brain2D though.
I've already learned so much just by working my way through things, I wont bug you unless i hit a mjor roadblock.
One suggestion for AC is a toggle for renaming hotspots their labels. Id rather have "blanket" in the hierarchy than "an old and dirty blanket". I found the logic in the script and turned it to a comment instead but something else was looking for that piece i disabled and threw an error. I decided i better not break it and i"ll just live with the different labels. Chatgpt said this used to be an option but chatgpt gets plenty wrong. Half the time i find my own errors instead of it figuring out what went wrong- like earlier when i accidentally selected box collider instead of box collider 2D. It had screenshots and should have caught something so simple but instead had me double and triple checking everything else.
No problem, I'm here for questions big and small.
Are you referring to the Hotspot's name in-game vs its GameObject name in the Hierarchy? The GameObject name is just the default - you can enter an override into its Label (if not name) field to avoid long full syntax in the Hierarchy.