DragonBones / DragonBonesCSharp

DragonBones C# Runtime
MIT License
533 stars 198 forks source link

Null Reference of UGUI Armature build #69

Open kultie opened 5 years ago

kultie commented 5 years ago

Building ArmatureComponent with isUGUI param is true resulting vertextBuffers of UnitySlot's MeshBuffer null Unity 2018.2.18f1

Awakeeeee commented 4 years ago

Same error at MeshBuffer null, but my problem is not caused by isUGUI parameter Reproduce(runtime version 5.6.300, unity version 2019.1.4f):

vipsbpig commented 4 years ago

Is this bug has any progress?

Awakeeeee commented 4 years ago

I think its about naming, for the armatureName you pass in, try use the skeleton name you specified in the DragonBone Editor, rather than any file names appear in unity

Ultraspider commented 4 years ago

Hello, I'm also facing this issue. I will investigate as soon as I have some time in my hands. During my test, I'm not sure but I have noticed it seems that if you have in the Unity scene a UGUI Armature object for same the armature you are building with UnityFactory.factory.BuildArmatureComponent() the vertextBuffers is filled correctly and the issue disappear.

Jomoyu commented 1 year ago

@Ultraspider Thanks, man. You gave me the idea.

After testing it, I found that every time I import a new asset (two json files and one png file), I need to Create an Armature Object in Hiearchy with the new asset, and then click Create in the Inspector on the right. This will generate a _tex_Mat file, which will call BuildArmatureComponent in the script without an exception. I don't understand why this is the only way to generate the missing file. The BuildArmatureComponent method itself does not create the file it needs

In UGUI mode, create an ArmatureObject(UGUI).

--by Google Translate