UMA - Unity Multipurpose Avatar on the Asset Store! (Part 2)

Oh sorry I must have been reading the update readme from version 1 to 2 I guess. I already am using UMA_GLIB in my scenes.

I’m using 2.12 and trying to update to 2.13 but I’m having difficulty finding instructions.

Can’t find anything on the store.

When I go to the github I’m looking through all these different update readme files but they are old dates. Maybe I’m on the wrong distro?

When I just attempt to update through the package manager I get a lot of errors.

Should I just do it like the old instructions say and delete the Core/example folders?

Sorry to be dense. Perhaps a couple of links on the asset store to different links: Update from 1 to 2, Update from 2.12 to 2.13 instruction links would be helpful for people not so savvy :slight_smile:

No problem - perhaps I can make that all clearer.

But to update, it’s just “move any customized content out of the UMA folder”, delete the folder, import the new package, Reindex by using the global library window “Rebuild from project” command.

Hi Jaimi,

the included hair works nice when I change the color.

I also have some other hair I bought, “MHair1”…10 from RPG starter package from Will, which works but does not change it’s color when I set UMA Hair color, do you have an idea why?

And can you give me a hint how to change skin color or material by script (Dynamic Character Avatar)?

Thanks :slight_smile:

Most likely the hair overlay in the recipe is not set to use the “Hair” shared color. To fix it, you would go into the recipe editor for each hair recipe, make sure it has the appropriate “Hair” shared color in the shared color settings, and then assign that to the hair overlay.

To set a color, use Avatar.SetColor(“Hair”,Color.Red); if you need more control over the color settings (ie, set individual channels for sheen, or shader parameters, etc, you can use SetRawColor() and pass an “OverlayColorData”.

1 Like

Thanks Jaimi for the hint!

But if I open the recipe and set “Use shared color” it takes half a second and the checkmark it auto-removed again, I can try as often as I like it is always removed again, I can see it for a short while.

I had this before in other components in UMA, would it be possible to add a Debug Log Error or some information popup in those cases why I cannot set it?

I can’t duplicate this - Is the recipe file writeable? If you hit “Save collection” after adding the color? If you clear the console, and then check the button, what messages do you get?

Are you on the 2.13 Asset Store version?

I inspected the hair, set material to Uma_Hair_Aniso and texture channels from 3 to 2. Now it works and I can set it to “Use shared color”.

I have one improvement suggestion for the PhotoBooth.cs: I got an exception in SetAnimationFrame because I have no UMAExpressionPlayer, so I added a null check:

		private void SetAnimationFrame()
		{
			var thisAnimatonClip = avatarToPhoto.umaData.animationController.animationClips[0];
			avatarToPhoto.umaData.animator.Play(thisAnimatonClip.name, 0, animationFreezeFrame);
			avatarToPhoto.umaData.animator.speed = 0f;
			if (avatarToPhoto.umaData.gameObject.GetComponent<UMA.PoseTools.UMAExpressionPlayer>() != null)
			{
				avatarToPhoto.umaData.gameObject.GetComponent<UMA.PoseTools.UMAExpressionPlayer>().enableBlinking = false;
				avatarToPhoto.umaData.gameObject.GetComponent<UMA.PoseTools.UMAExpressionPlayer>().enableSaccades = false;
			}
		}
1 Like

It would be great if the photobooth had a possibility to receive one recipe name then make one photo for that recipe. And a function to optinally just return the texture instead of writing it to disk.

This way you could show a 2d preview of a desired recipe instead of having to load a lot of files.
Just an idea, I am creating a store in my game where the user can buy wardrobe pieces and look at a preview and switch between mutliple wardrobe recipes…

PS: And then I could create a portrait or a full icon of my player, too, which could be used for multiple purposes (save slot, in game hud or on a map etc). Having a background “live photobooth” would be a great feature maybe for others too.

Yeah, I need to rework the Photobooth scene, maybe build the functionality straight into the Simple Setup scene

2 Likes

Hi Jaimi,
I’m having some problems with the new version:

  1. I get this error when I create a ne material:
NullReferenceException: Object reference not set to an instance of an object
UMA.Editors.UMAMaterialInspector.OnInspectorGUI () (at Assets/UMA/Core/Editor/Scripts/UMAMaterialInspector.cs:159)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass76_0.<CreateInspectorElementUsingIMGUI>b__0 () (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
  1. This error is triggered when I add a recipe:
Tag: UMAKeepChain is not defined.
UnityEngine.Component:CompareTag (string)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:112)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveMountedItems () (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:104)
UMA.CharacterSystem.Editors.DynamicCharacterAvatarEditor:GenerateSingleUMA (bool) (at Assets/UMA/Core/Editor/Extensions/DynamicCharacterSystem/DynamicCharacterAvatarEditor.cs:997)
UMA.CharacterSystem.Editors.DynamicCharacterAvatarEditor:ShowEditorCustomizationGUI () (at Assets/UMA/Core/Editor/Extensions/DynamicCharacterSystem/DynamicCharacterAvatarEditor.cs:458)
UMA.CharacterSystem.Editors.DynamicCharacterAvatarEditor:OnInspectorGUI () (at Assets/UMA/Core/Editor/Extensions/DynamicCharacterSystem/DynamicCharacterAvatarEditor.cs:196)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

And this error as well:

Tag: UMAIgnore is not defined.
UnityEngine.Component:CompareTag (string)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:112)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveBonesRecursively (UnityEngine.Transform,UnityEngine.Transform,string,string) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:131)
UMA.UMAData:SaveMountedItems () (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:104)
UMA.CharacterSystem.Editors.DynamicCharacterAvatarEditor:GenerateSingleUMA (bool) (at Assets/UMA/Core/Editor/Extensions/DynamicCharacterSystem/DynamicCharacterAvatarEditor.cs:997)
UMA.CharacterSystem.Editors.DynamicCharacterAvatarEditor:ShowEditorCustomizationGUI () (at Assets/UMA/Core/Editor/Extensions/DynamicCharacterSystem/DynamicCharacterAvatarEditor.cs:458)
UMA.CharacterSystem.Editors.DynamicCharacterAvatarEditor:OnInspectorGUI () (at Assets/UMA/Core/Editor/Extensions/DynamicCharacterSystem/DynamicCharacterAvatarEditor.cs:196)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Thanks

Oh - thanks, I can duplicate this, so I will fix it in the next update.

As a workaround, you can turn the inspector into debug mode (right click on the tab to change modes), then add a channel, and then turn it back to normal mode.

Or, you can go into the UMAMaterial.cs, and find the line were it defines the channels, and change it from this:

        public MaterialChannel[] channels;

to this:

        public MaterialChannel[] channels = new MaterialChannel[0];

But if you change the code, you should delete your material, and recreate it after the code change.

The other two errors are missing tags. The system should have added those for you when you imported it (when it asks you to reindex the global library).

But you can fix it manually by adding those two tags (UMAIgnore, UMAKeepChain) to the tags editor.

To do that, open up Project Settings, go down to tags and layers, and add those two items.

Did you get the prompt to update the library? If so, did you answer it? Is this the first time you have installed UMA?

Thanks, just trying to figure out how to stop this in the future.

1 Like

No, I didn’t receive any prompts to update the library, but I updated it manually by choosing “Rebuild From Project”.
In fact this not the first time I use UMA. I used the previous version with assets from Unity Asset Store, “DragonsanStudios”.

Sorry for bothering you, Jaimi,
Now I have two new errors when I add a recipe.
I’m using Unity 2022.3.37 URP

TargetParameterCountException: Parameter count mismatch.
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <c0b7b90d34a54066a7234dad69255116>:0)
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <c0b7b90d34a54066a7234dad69255116>:0)
UnityEditor.EditorWrapper.Init (UnityEngine.Object obj, UnityEditor.EditorFeatures requirements) (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEditor.EditorWrapper.Make (UnityEngine.Object obj, UnityEditor.EditorFeatures requirements) (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEditor.EditorCache.get_Item (UnityEngine.Object o) (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEditor.SceneView.CallEditorDragFunctions (System.Collections.Generic.IList`1[T] dragAndDropObjects) (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEditor.SceneView.HandleDragging (UnityEngine.Event evt) (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEditor.SceneView.DoOnGUI () (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEditor.SceneView.OnSceneGUI () (at <4f70cf68b8b24a78aa3a87c1d6120925>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.CallbackEventHandler.UnityEngine.UIElements.IEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <02b90f1c0dfb49a1adfd6da071d5b611>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <574a6b83c2d440099e345550185555c4>:0)
Failed to dispose EditorWrapper.
UnityEditor.EditorWrapper:Finalize ()

This is all internal to Unity - what specifically are you doing? My first thought is that something has an event on a slot that existed before the update, and that the function signature changed, though I try to avoid that.

Nothing special, only dragging the recipe from the project to the Default Wardrobe Recipe.
Once the mouse pass over the scene, the error is triggered.
Even when adding the recipe from the Default Wardrobe Recipe.

That would seem to make this some sort of GUI mouse event that it’s trying to call.

Are you in a sample scene? If so, which one?
Do you have an extra event handler on your character for Mouse input/selection?

No, I created a new scene. Nothing in the scene except UMA character.

OK - all the other ways work to add recipes without error, it seems - so something has changed in the drag/drop since this was first written.

The workaround is to ignore it since it actually succeeds, or to use the “click to pick” or (better, in my opinion) the “Add Item” dropdown that categorizes everything.

I’ll fix the error, but it doesn’t seem to cause any adverse effects besides edit-time console spam.

Since these errors are related to the Editor, they do no harm, no errors in the play mode or build which is good.
Thanks for your help.

1 Like

Hello,

the default underwear is a bit short and shows a bit too much maybe.
Do we have a bit longer underwear somewhere or in an asset that still works? Or maybe some shorts for both genders, I only saw that for male?

Thanks. I need some minimum clothing I can use, which would be fine to all users :slight_smile:
(my wife saw my female chars in the editor in the default underwear and called them “naked” lol)