- Modifié
BoneFollower INVALID alert
Hey there,
That would be nice if you could throw a console Alert at compilation (or before?) when a BoneFollower component is INVALID. That would both let us know about it, and maybe explain what's going a bit better than INVALID. If it's possible that would makes sens to me and would prevent possible loss of time looking for a bug origin.
By the way, for some reasons I have a BoneFollower component getting INVALID each time I compile, even If I setup it correctly, it breaks upon compilation. That happens since my today runtime update (last unitypackage). That might be on my side though, I'll dig a bit more before claiming it's a bug report :p
Your BoneRoot probably got "nulled". Try resetting it
Thanks for the tip! Though I looked around and I'm not sure where to reset BoneRoot as you suggest.
Try the debug inspector (top right corner, click the menu) on your spine object and then on any bones involved
Mmmh, even in debug I can't seem to find a BoneRoot property on my Spine object. In fact, the only place I find a "boneRoot" is by looking into SkeletonUtility.cs class which I never use directly, so not sure how BoneRoot could appear in the Inspector ?
BoneFollower, huh?
Sorry about the cryptic message. I'll definitely add something more descriptive.
Damnit, Mitch.
Anyway, according to the code, it says "INVALID" when:
- it doesn't have a SkeletonAnimation:SkeletonRenderer assigned. or...
- it does have a SkeletonAnimation:SkeletonRenderer assigned, but that assigned SkeletonRenderer failed to initialize properly so that was invalid.
A SkeletonAnimation:SkeletonRenderer stays invalid in the editor when it fails to completely instantiate the Skeleton setup.
If it was the SkeletonRenderer causing the problems, there should be other errors being logged in the console. If the problem was only that no SkeletonRenderer was assigned, it doesn't log anything, but the fact that the SkeletonRenderer inspector field is empty should be obvious.
Sounds like there is already some kind of private joke around BoneFollower at Esoteric :giggle:
Thanks for your explanations. I was trying to edit BoneFollower on a Prefab so that might be the problem? Because at runtime the BoneFollower actually has a valid SkeletonRenderer and it seems to work... (I freaked out for nothing upon that INVALID prompt apparently)
So that was not the origin of my bug. Instead, it's this nasty box which gets unchecked when I activate/deactivate the whole GameObject. Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même
Would you have a code example of how to check that box using C#? I have a reference to the BoundingBoxFollower component, no worry, but after messing with its different Dictionaries, I still can't figure it out.
That box gets turned on/off by the SkeletonAnimation, depending on whether the box is enabled or not in the Spine editor during that animation.
Thanks for the hint, but the thing is, it is always turned on for that specific animation (In the Spine Editor at least). And it gets turned off, only when I setActive(false) and then setActive(true).the main character GameObject.
In addition, this is actually the only animation played for this character. So this can't be due to some weird blending messing up my Slot being attached or not.
(I'm getting to the point where I start considering ugly workaround :bang: )
You mean instantiating the skeleton instead of using a prefab reference?
Not sure that would solve the setActive issue. I'll just hide it instead :/