Hello,
there seems to be weird behaviour inconsistencies with how the Bounding Box Follower Script works vs. how it "should" work:
Case A:
Step 1: I use the BoundingBoxFollower.cs script to set my hitboxes on an object.
Step 2: I set up a reference to store the freshly created bounding boxes (Collider2D Components) from one of my other scripts.
Step 3: I then save the entire thing as a prefab.
Step 4: I instantiate the prefab and the references are broken.
This is probably because the BoundingBoxFollower.cs script dynamically creates those colliders? It is, however, extremely unfortunate as it really limits how you can interact with those hitboxes.
Case B:
Step 1: Create an animation that switches bounding boxes via the attachment keyframe in Spine. What I mean is that the animation literally switches from one collider to the other by switching the slot attachments.
Step 2: Export the spine file to Unity and set up the BoundingBoxFollower.cs script to access said hitboxes.
Step 3: Play the game in the Unity EDITOR, everything works as intended.
Step 4: Make a build for Windows, play the compiled build in Windows: The switching of the bounding boxes does not work in the compiled build of the game, even though it did in the Unity Editor.
I am guessing that this also has to do with how the Bounding Boxes are created and maintained, although I do not know the specifics of this.
TL;DR There are some major bugs with the whole BoundingBoxFollower.cs thing which makes it almost unusable at times due to critical bugs that only occur in compiled builds vs. the Unity Editor itself.