DragonBonesUnity
DragonBonesUnity copied to clipboard
Child armatures not working.
I can confirm that child armatures/skeletons do not work. Any thoughts on where the problem might be?
A new gameObject gets created for each child armature but it has no visible mesh. Also the gameObjects for the child armatures are not parented nor part of the main armature and are just floating off in space by themselves.
It may be better to use Unity 2d sprites and have a seperate sprite for each slot or bone. Or it would at least be nice to have the option to use sprites instead of a MeshRenderer. I see there is some code in UnityFactor that is commented out and uses the SpriteRenderer component for Unity sprites, is the planned for an update or was it replaced with the current MeshRenderer implementation?
Hi Matt,
Sure, the child armature functionality is not tested, and I assumed it may not work properly. I will find a way to make it work in the future.
And about the Unity2D sprite, yes, as you can see in the source, actually I've implemented it that way at first, every gameObject is a bone, works fine with child armature I think, but unfortunately, the calculation on the transformation of gameobject is so expensive, and I felt the performance of that is unacceptable for a animation system as Dragonbones, so I abandoned that solution and use submeshes, it gives the best performance I can get, but the price is lack of some functionalities...I've list this as known issue in Github, maybe lack an English edition, I will add a English instruction on this.
But as you mentioned, a switch option of that may be a good idea, I will consider that.
The most immediate help I can offer for now is the code attached, it's the initial implementation I mentioned above, it use unity2D sprite as bone, I believe the child armature will work properly, and if not, it also will be very easy to fix, because it's very similar with flash edition's display structure.
Note: to have the recent update, you can just replace the "Display" and "Factory" folder's content, and please test it on your platform to ensure the performance of that is acceptable for your project.
Thanks Johnson
On Fri, May 2, 2014 at 10:42 PM, Matt Summers [email protected]:
I can confirm that child armatures/skeletons do not work. Any thoughts on where the problem might be?
A new gameObject gets created for each child armature but it has no visible mesh. Also the gameObjects for the child armatures are not parented nor part of the main armature and are just floating off in space by themselves.
It may be better to use Unity 2d sprites and have a seperate sprite for each slot or bone. Or it would at least be nice to have the option to use sprites instead of a MeshRenderer. I see there is some code in UnityFactor that is commented out and uses the SpriteRenderer component for Unity sprites, is the planned for an update or was it replaced with the current MeshRenderer implementation?
— Reply to this email directly or view it on GitHubhttps://github.com/DragonBones/DragonBonesUnity/issues/4 .
Hello Johnson,
I don't see the code you mentioned attaching.
Thanks Matt
Oh...I replied directly from gmail, it looks like the attached not delivered to your email than to be ignored by github's notifying system.
Please send a mail from your personal email to "[email protected]" directly, then I can send you the source via attachment by replying directly to your personal mailbox.
On Sun, May 4, 2014 at 2:13 AM, Matt Summers [email protected]:
Hello Johnson,
I don't see the code you mentioned attaching.
Thanks Matt
— Reply to this email directly or view it on GitHubhttps://github.com/DragonBones/DragonBonesUnity/issues/4#issuecomment-42112283 .
Hi,
sorry to reuse this issue, but it seems nothing was fixed about childArmature.
so i have one question : where or how can i convert the position i have in skeleton.json to a position i can apply to a GameObject ? or do you have some way to fix the childArmature problem ? (like the attached code you metionned before).
thanks, xDelph