UMA compatibility?

ChoChick

New member
Using ThirdPersonController 2.1.1 and UMA 2.8.

While checking the UMA setting method, use BoneBuilder to set characters and items in UMADynamic CharactAvatar.
In the runtime pickup test, the item sets only Body.

Play demo.
If touch Katana for the first time, an error will occur.
After touching the second time, I can pick up Katana.

Tried to set a character in Fbx of UMA project without using UMADynamic CharacterAvatar.
No error was displayed.

Both copy Nolan's component values in the same way.
Did I miss setting required to use UMADynamicCharacterAvatar?UCCerror.PNG
 

Justin

Administrator
Staff member
That error doesn't look like it is directly related to UMA. It looks like m_CharacterFadeMaterials is null, but this should be initialized within OnAttachCharacter. Does ObjectFader.OnAttachCharacter get executed?
 

ChoChick

New member
That error doesn't look like it is directly related to UMA. It looks like m_CharacterFadeMaterials is null, but this should be initialized within OnAttachCharacter. Does ObjectFader.OnAttachCharacter get executed?
As soon as play the demo, Object Fader.OnAttachCharacter get executed.
And when player touch it, Katana only causes an error once.
Do I need to manually set m_CharacterFadeMaterials in component?
UCCerror.PNG
 

ChoChick

New member
If set an item other than Body (eg AssaultRifle) to Character from Item Manager, Katana will not give an error.
I tried setting the MeshRenderer component in the RightFist of RightItems' child.
Katana did not issue an error and the player was able to pick up Katana.
Characters that do not use UMADynamicCharacterAvatar seem to be able to pick up Katana without setting MeshRenderer component to Fist.
 

Justin

Administrator
Staff member
Do I need to manually set m_CharacterFadeMaterials in component?
No - m_CharacterFadeMaterials should be initialized on line 212. Can you set a breakpoint within OnAttachCharacter and determine why it's not getting to that line?
 

ChoChick

New member
No - m_CharacterFadeMaterials should be initialized on line 212. Can you set a breakpoint within OnAttachCharacter and determine why it's not getting to that line?
When OnAttachCharacter is called, UMARenderer has not been created as a child object of UMADynamicCharacterAvatar yet.
If the character does not have a "weapon that set the MeshRenderer component", the length of the renderer at line 200 is 0 and the count at line 205 has not been added.
By passing through the if in line 210, it seems that m_CharacterFadeMaterials can not be initialized because it can not reach line 212.
 

Justin

Administrator
Staff member
OnAttachCharacter should be called after UMA has completed so the renderer should be completed. I am assuming that you are using the runtime version from the UMA docs, correct? Here's my call stack where OnAttachCharacter is called after UMA is complete and the renderers have been added.

OnAttachCharacter
UnityEngine.Debug:Log(Object)
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader:OnAttachCharacter(GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Camera/ObjectFader.cs:178)
Opsive.UltimateCharacterController.Events.InvokableAction`1:Invoke(GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/InvokableAction.cs:87)
Opsive.UltimateCharacterController.Events.EventHandler:ExecuteEvent(Object, String, GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/Events/EventHandler.cs:392)
Opsive.UltimateCharacterController.Camera.CameraController:InitializeCharacter(GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:460)
Opsive.UltimateCharacterController.Camera.CameraController:set_Character(GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:62)
Opsive.UltimateCharacterController.Integrations.UMA.UMACharacterBuilder:OnCharacterCreated(UMAData) (at Assets/Opsive/UltimateCharacterController/Integrations/UMA/UMACharacterBuilder.cs:133)
UnityEngine.Events.UnityEvent`1:Invoke(T0)
UMA.UMAData:FireUpdatedEvent(Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:1186)
UMA.UMAGeneratorBuiltin:UMAReady() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:373)
UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:258)
UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:272)
UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
UMA.UMAGeneratorBuiltin:Update() (at
[/qupte]
 

ChoChick

New member
OnAttachCharacter should be called after UMA has completed so the renderer should be completed. I am assuming that you are using the runtime version from the UMA docs, correct? Here's my call stack where OnAttachCharacter is called after UMA is complete and the renderers have been added.
The way I use it is not to set it at run time using UMACharacterBuilder.
How to add bone to UMADynamicCharacterAvatar in BoneBuilder and set it as a character in Character Manager and Item Manager.
Since I do not fully understand UCC and UMA, I chose an easy to configure method.
 

Justin

Administrator
Staff member
Did you go through the steps required to make it work with bone builder? Steps 6-8 are especially important. I'm kind of surprised that you are getting that error with the bone builder method because people have been using UCC and UMA with bone builder before the UMA integration was even released.
 

ChoChick

New member
UCCerror.PNG
I read while translating the page that describes the setting method, I think that I set according to the written procedure.
I tried with Unity 2018.2.18f1 and Unity2018.3.8f1, but both have errors.
It does not seem to affect the version of Unity.
 
Last edited:

Justin

Administrator
Staff member
This could be related to the execution order. UMA needs to finish building the character first before the renders are cached. What happens if you try changing the execution order the UMADynamicCharacterAvatar so it executes before everything else?

If that still doesn't work feel free to send a repro project to support@opsive.com so I can take a look.
 

ChoChick

New member
UCCerror.PNGThe order of execution seems to be that UMAGenerator is being executed first.
I changed the execution order of UCC and added DynamicCharacterAvatar and UMADynamicAvatar.
(I may be wrong because I do not fully understand UMA and UCC)
But I get an error.

I can't afford to spend more time on this error, so add a MeshRenderer to the character's Fist to avoid the error.
Thank you for your support.
 

ChoChick

New member
If my character is set to UMADynamicCharacterAvatar, I can not see it without looking down at the camera.
UMA sample characters are displayed correctly.
My character set for UMA without UCC character setting will not disappear from the screen.

ObjectFader's CharacterFade is off.
Are there other settings to check?
Is this not a UCC issue, but a UMA issue?
1015
 

Justin

Administrator
Staff member
If you aren't using the object fader then there isn't anything on the UCC side of things that would prevent the character from rendering.
 

DankP3

Member
I am experiencing issues with my UMA integration (using bone builder in the first instance), which i am sure are due to two things, an issue with my skeleton which i am working on (Not the fault of UCC) and an issue with the collider build. I think the issue with the collider build is related, but seems to suggest to me that UCC doesn't wait for the UMA build to complete. In some cases it can take a few ticks, by which point the collider has missized already. I wonder if this is related to the issue discussed above (null references)? I am preferring to first fix my skeleton rather than patch UCC, as the former is best practice and may help resolve the latter, but thought i would raise it as code sequence seems to be important, but not necessarily simply at execution order, i think making the initalisation of UCC character wait for UMA avatar created event may ultimately be useful?
 

ChoChick

New member
UMARenderer is generated at a position (underground) lower than the character's position.
UMARenderer did not enter the camera view, and the character was not displayed.
Characters are now displayed when I change the avatar from my character to an avatar created.
However, changing the avatar will cause another error.

If I create a new scene and make the same settings (without changing the avatar), UMARenderer will be generated at the same position as the character.
Does the demo scene of UCC affect the creation position of UMARenderer? (My UMA settings may be wrong)
 

DankP3

Member
@ChoChick, I think we may have been battling the same problems with different issues. in my case in a clean scene, the UCC collider was misforming. I thought it was due to an error in the rig, but actually I think it is due to the assignment of a default UMAAnimatorAvatar, if I override this at the start (and bone build resets it so you need to keep on it - I added an Animator to the default UMA prefab). Thanks for the hint.

As for the offset, this may be for @Justin , my offset is 0.81 on the x with a collider radius of 0.4. If I change the collider radius to 0.1, the offset is 0.21. So my assumption is the UCC character thinks it is colliding on creation and moves? could this be correct?
 

Justin

Administrator
Staff member
The collider will readjust to get out of the way if there is a collision, but just a renderer being added shouldn't cause a problem because there is no collider associated with that.
 

DankP3

Member
The collider will readjust to get out of the way if there is a collision, but just a renderer being added shouldn't cause a problem because there is no collider associated with that.
where is the code for this please, so i can just disable it and confirm that is the issue (I am in an empty scene so also confused that a collision may be an issue). Thanks.
 
Top