Not a bug

Game object occasionally will not be loaded correctly

Adunato 3 years ago updated by Peter - Soxware Developer 3 years ago 6

Occasionally (but fairly often) after dropping a humanoid game object in the Pose Editor the object will not get fully loaded. The object will take currently loaded clip pose in Pose Editor mode and will go back to a reference position in Config mode but no bones are shown and playing the animation in the Clip Editor won't have any effect.

Other than restarting Unity, what works is to change the layout so that Pose Editor and Clip Editor are closed and then switch back to the layout with both panes open. Generally, once the panes have been "restarted " the model is imported correctly.

UMotion Version:
1.25p01
Unity Version:
2020.3.2f1
Under review

Hi Adunato,

thank you very much for your bug report. I really appreciate that.

I currently haven't heard of such an issue yet from other users which probably means that this might only occur in very specific configurations. Do you have any other third party assets installed that influence the editor/editor GUI (e.g. ProBuilder, ...)? Does this also happen in an empty Unity project for you?

May I ask you to record a short video when this happens the next time so that I can see the influence of this issue (maybe there are some things that guide us into the direction from where this is coming)?

Thank you very much.

Best regards,
Peter

Hi Peter,

I did some testing and replicated the same issue with a brand new project and I think I may have an idea of the situation causing the issue. The asset I'm using is a skeleton part of a LOD hierarchy, it also has some key shapes, so not exactly a standard scenario.

Now, I'm struggling to replicate the issue consistently though, I have captured a video of the issue but I set the display incorrectly so you can't see the Pose Editor. When I tried (several times) to capture the issue with the correct display it worked every single time (obviously).

The video is below, but again it lacks the view of the Pose Editor.

Hi Adunato,

yes the specific LOD setup of your character might be causing this  issue. Usually, LODs only change the skinned mesh but in your case it swaps the whole version of your character (including bones etc) as the character you assigned to UMotion is a child of the LOD group and the LOD group is still active and might hide your characters bones.

Just out of personal interest, may I also ask what design choices have been the driver for this specific LOD setup?


This is an example LOD setup that I would consider as what I thought is the usual way of doing LODs with characters:

The workaround should be easy: Temporary remove the LOD group for the animating version of your character.


May I ask you to send me that specific character with it's specific LOD setup so that I can implement something in UMotion that can correctly deal with this in future versions? You can send it to me via the email support form (you can send it without textures if you want).

Thank you very much.

Best regards,
Peter

Hi Peter,

Thanks again for looking into this. Personally, I don't think this is a setup that should be supported by uMotion, it''s quite unusual and as you say not best practice. The only reason I'm using it is that it's part of an asset which I'm using for prototyping characters: https://assetstore.unity.com/packages/3d/characters/humanoids/humans/advanced-people-pack-2-170756

I think I reproduced the actual bug, if you want to call it that way, which only seems to occur when you drag a LOD skeleton that is not being displayed at that time (e.g. LOD1 is visible but you drag LOD0 in the Pose Editor), uMotion keeps working with no issues if changing LOD once the armature has been loaded, but obviously the posed LOD disappears if swapped.In the case of the "bug" uMotion seems to break at that point and stops displaying bones even for new projects, only restarting uMotion seems to fix it.

Hope this helps, but personally I'll be simply work around this issue while I work with this asset and then move onto a more traditional setup.

I sent you separately a package with the test character if you want to try reproduce the issue.

Thanks again for your support.

Working on fix

Hi Adunato,

thank you very much for sending me the files. Glad to hear that a workaround works for you. I'm able to reproduce this issue and am looking into what would be the best strategy to deal with it.

I'm going to keep this thread updated.

Don't hesitate to contact me in case you have any questions or found any other issues/problem.

Best regards,
Peter

Not a bug

Hi Adunato,

I've just did some further investigations as I wanted to implement a fix for this today. Turned out this is caused by a bug in the editor script of the "Character Custimization" component that is assigned to the "male_1" character.

Please change Line 135 in "AdvancedPeoplePack2/Scripts/Editor/EditorCharacterPrefabEdit.cs" from:

EditorApplication.update = UpdateCallback;

to

EditorApplication.update += UpdateCallback;

Notice the added plus.

So what happens is that whenever UMotion is already initialized and the "Character Custimization" Inspector is shown afterwards (because the "male_1" game object is selected), the above editor script removes all scripts that previously registered to the Unity editor's update event. Meaning that UMotion is not called each frame anymore. This also affects any other editor scripts in your project that register to the editor's update callback.

I'm contacting the publisher of the "AdvancedPeoplePack2" in order to fix this issue in his package. I'm also contacting Unity as this is really bad API design on their end (forgetting a "+" in one script shouldn't break the functionality of all other editor scripts in your project).


Best regards,
Peter