Search Unity

UMA - Unity Multipurpose Avatar on the Asset Store!

Discussion in 'Assets and Asset Store' started by FernandoRibeiro, Dec 24, 2013.

  1. DavidGrof

    DavidGrof

    Joined:
    Sep 13, 2016
    Posts:
    17
    It gets created just in the scene(I am using 2.8) then it gets removed when saved to a prefab. I think the issue is the new prefab system. (The context does not get created in the new prefab view)
    https://imgur.com/a/6OHp0cu
     
    Last edited: Jan 31, 2019
  2. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    There's something very strange going on. When I instantiate a weapon in a slot I hang under one of the bones added via the Bone Builder, the object is instantiated twice, while I am 100% and absolutely sure I only instantiate it once. I get this. When I instantiate it in Root, the error disappears, but I indeed see two staffs then.

    AddBonesRecursive: Staff2(Clone) already exists in the dictionary!
    UnityEngine.Debug:LogError(Object)
    UMA.UMASkeleton:AddBonesRecursive(Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:154)
    UMA.UMASkeleton:AddBonesRecursive(Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:159)
    UMA.UMASkeleton:.ctor(Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:86)
    UMA.UMADefaultMeshCombiner:EnsureUMADataSetup(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:91)
    UMA.UMADefaultMeshCombiner:UpdateUMAMesh(Boolean, UMAData, Int32) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMADefaultMeshCombiner.cs:143)
    UMA.UMAGeneratorBuiltin:UpdateUMAMesh(Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:282)
    UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:226)
    UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:265)
    UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
    UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:97)
     
  3. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    334
    Are you creating the weapon object at edit time, or spawning it from a script at runtime? I assume at edit time if you're using the bone builder, but then you should be able to see in the editor how many game objects there are. Do you have one in each hand? If so, you should prefix their name with like "left" and "right".
    UMA doesn't like objects in it's hierarchy with the same name. So if you have duplicate objects, that's why you're seeing those errors.
     
  4. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    It's during runtime, as it depends on which weapon the character is holding. The character can use dual weapons, but he's currently holding just one weapon: there's only one instantiation. I needed the bone builder to be able to spawn said weapon as a child of a bone (or one of the bones itself), so that it moves with the character when it's animated.
     
  5. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    P.S. Where can I donate for this asset? You shouldn't offer this for free. It is worth more than $0...
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    We don't currently have a way to donate money - it would be nice to pay for a commercial slack, but it would also introduce a new set of issues (how to make up shortfalls, etc).
    Since it's an open source project, the best thing would probably just be to contribute to the product itself - assets, documenation, etc.
     
    hopeful and LoekvanKooten like this.
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    Are you rebuilding the character after adding the staff? Are you doing anything in events?
     
  8. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    No, I just Instantiate a Scriptable Object that has been added via the Player's Inspector. This is done only once, right after the player has been instantiated (at this stage, you can't change or instantiate other weapons yet).
     
  9. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    Then this issue:
    To which this solution was proposed:
    This doesn't work. Removing this collider ensures that no Dynamic Avatar will spawn anymore at runtime. This happens in both Unity 2f and 3.
     
    Last edited: Feb 1, 2019
  10. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    What version of Unity are you using? I'm just not seeing it move, but physics have changed in different versions of Unity as well. This is what the physics setup looks like when I run the app:

    Physica.jpg
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    Also - I believe you would need to remove the "PhysicsStandardRecipe" to completely stop it. That is used for Ragdoll, and ponytails, etc.
     
  12. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    I think it's probably something with the system thinking it's a bone. Until we can dig into it, You could add it in the "Character Created" event.
     
  13. jasrei

    jasrei

    Joined:
    Apr 19, 2018
    Posts:
    13
    I'm having a problem with ClearSlot(). I assume I'm just doing something incorrectly. In my inventory system, when I equip an item (currently the hoodie), it works just fine.. Here's the code that does it:

    Code (CSharp):
    1. if (item.UmaRecipe != null && this.avatar != null)
    2. {
    3.     this.avatar.SetSlot(item.UmaRecipe);
    4.     this.avatar.BuildCharacter();
    5. }
    Then, when I un-equip the item, I run this code:
    Code (CSharp):
    1. if (item.UmaRecipe != null && this.avatar != null)
    2. {
    3.     this.avatar.ClearSlot(item.EquipmentType.ToString());
    4.     this.avatar.BuildCharacter();
    5. }
    I believe this is basically the same code that I saw in a tutorial. However, when my un-equip code gets called, the item removes and there is no mesh at all, just a big empty space where there should be a torso. In the tutorial I saw, the naked torso re-appeared, but not in my code.

    I assume I'm missing something simple, but I haven't been able to figure out what yet.

    Also:
    this.avatar is a DynamicCharacterAvatar member variable. and item is an instance of an Item ScriptableObject and the UmaRecipe field is of type UMATextRecipe.
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    What version of UMA are you using? Are you sure there is nothing else that has removed the torso?

    can you go into the "Simple Setup" scene, add the hoodie and remove it, and see if you see the same issue?

    This is the code that Simple Setup is using to change the slots (coming from the button click):

    Code (CSharp):
    1.         public void OnClick()
    2.         {
    3.             // If there is no recipe, then just remove whatever is there (if any)
    4.             if (Recipe == null)
    5.             {
    6.                 Avatar.ClearSlot(Slot);
    7.                 Avatar.BuildCharacter(true);
    8.                 Avatar.ForceUpdate(true, true, true);
    9.                 return;
    10.             }
    11.             // We have a recipe.
    12.             // The wardrobe slot is defined in the recipe itself, so setting a recipe is all
    13.             // that is needed to "put on" a wardrobe item.
    14.             // Any recipe that already exists at that slot will be removed - so, for example,
    15.             // putting on a shirt will replace the existing shirt if one exists.
    16.             Avatar.SetSlot(Recipe);
    17.             // Rebuild the character so its wearing the new wardrobe item.
    18.             Avatar.BuildCharacter(true);
    19.             Avatar.ForceUpdate(true, true, true);
    20.         }
     
  15. jasrei

    jasrei

    Joined:
    Apr 19, 2018
    Posts:
    13
    I see the same behavior in the sample scene. I add the hoodie and it looks good. I remove it and there's a big empty space where the torso should be. I just grabbed this version of the asset store in the last couple of days.

     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    We are preparing a new release - A unitypackage of the final release candidate is available here:

    https://github.com/umasteeringgroup/UMA/releases/tag/v2.8rc3

    I was unable to duplicate the issue in the RC. It has a metric ton of new features, fixes, and is faster as well. I recommend updating to that version.
     
    hopeful likes this.
  17. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    I'm currently using 3.3f1. This is what I get:

     
  18. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    I'm not sure what the Character Created event is (sorry, I'm completely new to UMA but trying to learn really hard), but as I can currently work around this using the mage asset from MB1 FB1, it's not that urgent. So it's probably best to dig into it and come up with something that will work without work-arounds :D
     
  19. jasrei

    jasrei

    Joined:
    Apr 19, 2018
    Posts:
    13
    That fixed it right up. Thanks man!

     
    Jaimi likes this.
  20. iyango

    iyango

    Joined:
    Jan 26, 2019
    Posts:
    4
    Thank you. Would be great to get some advice with this.....
     
  21. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    I'm now trying to apply the ThirdPersonCharacter (the standard Unity one) to the avatar and have followed the instructions in this thread (about editing the scripts, setting Ground Distance etc) to the letter.

    However, my avatar does not walk, as if he's stuck in the landscape. The feet move though and the character does turn.

    What could be causing this?
     
  22. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    Also I get this:

    Code (CSharp):
    1. Destroying assets is not permitted to avoid data loss.
    2. If you really want to remove an asset use DestroyImmediate (theObject, true);
    3. UnityEngine.Object:Destroy(Object)
    4. UMA.UMAUtils:DestroySceneObject(Object) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAUtils.cs:124)
    5. UMA.UMAGeneratorBase:UpdateAvatar(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBase.cs:198)
    6. UMA.UMAGeneratorBuiltin:UpdateUMABody(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:399)
    7. UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:249)
    8. UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:272)
    9. UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
    10. UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:97)
     
  23. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    It is this behaviour:



    The character starts shaking wildly when I press the move buttons. He wants to move, but something is stopping him. The shaking disappears and the animations stabilize when I turn of the ThirdPersonCharacter controller, but still the character does not move. The navmesh also seems to have something to do with it.

    Please note that exactly the same script works flawlessly on an MB1 FB1 avatar.
     
    Last edited: Feb 3, 2019
  24. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,875
    We can't see the video, but is it possible you have more than one collider on the UMA character? UMA by default creates a capsule collider (you can turn it off, there's checkbox for it), and you probably also have one associated with your implementation of the character controller.
     
    Jaimi likes this.
  25. ghtx1138

    ghtx1138

    Joined:
    Dec 11, 2017
    Posts:
    113
    Hi just starting out with UMA. Thanks to the devs and contributors - looks like a great asset.

    I'd like to use HDRP - I see from github "There are issues with the atlas shaders and/or the texture merge - we will be looking into this after we have stabilized 2.8 for release (2018.3 is being a particularly rough upgrade)" https://github.com/umasteeringgroup/UMA/issues/192

    There's also another comment from @Jaimi in this thread similar.

    Is there any way to mash together a short term solution for basic skin colours (no clothes) or are the atlas shaders and texture merge functions (which I presume are fundamental to the inner machinery of UMS) going to need to be rewritten?

    Thanks
     
  26. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    This looks like you have added an Animator to your prefab, and you have supplied your own avatar to it from a prefab. UMA is trying to destroy that so it can replace it with the generated avatar.

    The simplest thing is to delete the Avatar from the Animator, and just let UMA fill it in.
     
    terrycheung likes this.
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    I'm not an expert on this part of the code, but I don't think there is a quick fix to get it working. Maybe one of the other contributors might have an idea. There is a trello task to get this working in 2.9.
     
  28. ghtx1138

    ghtx1138

    Joined:
    Dec 11, 2017
    Posts:
    113
    Thanks @Jaimi I figured it might be a 2.9 feature. Cheers
     
  29. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    The video should be visible now.

    If I remove the collider, nothing changes. If I remove the CapsuleColliderRecipe, nothing changes. If I remove both, nothing changes. In all cases, I never see two colliders during runtime, so apparently they don't stack (at least not visibly).

    If I remove the avatar from the animator, my character disappears. The error disappears too. So it seems I'm damned if I do and damned if I don't.


     
    Last edited: Feb 3, 2019
  30. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    P.S. Changing the speed in Player Movement doesn't change anything either (it's set to 0 in the screenshots).
     
  31. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    I'm pretty sure it has to do with this default behaviour in the demo scene.



    If I turn the CapsuleColliderRecipe off, no avatar appears and the terrain stays still.
     
  32. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    334
    Remove the PhysicsStandardRecipe (that's what I was thinking before, but i misspoke). It was accidentally added in the simple setup scene for RC3 and it will cause those issue if your project's collision matrix isn't set up correctly.
    upload_2019-2-3_8-55-48.png
     
    hopeful likes this.
  33. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    That indeed solves the issue in the Demo Scene. Thank you!

    All the other issues remain though. I must continue development, but am completely stuck due to this issue.
     
  34. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    334
    Correct, the CapsuleColliderRecipe won't overwrite and existing CapsuleCollider component on the gameobject.

    In your video, you have different capsule height settings than in your later screenshots. In your video your capsule collider looks part-way in the ground. In your later screenshots the capsule looks correct, but you get that same issue as in your video or a different one?
     
  35. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    I indeed get exactly the same issue when the collider is above the ground.

    I can't express how much I appreciate your help with this, by the way.
     
  36. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    This was all solved because of the fantastic help of kenamis. UMA is now running very smoothly in my game (it turned out that my custom movement code didn't like UMA, especially not in combination with Unity's standard AI Control).

    If I want to change for example the cheek size at runtime (it can't be baked into the avatar itself it seems, as there's no UMA Data component in Edit mode), what commands would I need?

    Code (CSharp):
    1. myUMAData = GetComponent<UMAData>();
    And then?
     
  37. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    You can set the DNA from the DynamicCharacterAvatar using a DNASetter:

    // get the current DNA:
    Dictionary<string, DnaSetter> DNA = MyDCA.GetDNA(); // MyDCA is the DynamicCharacterAvatar
    // Set the DNA to whatever you want:
    DNA["TheDNAName"].Set(0.7f); // value should be between 0..1
    // Tell it to update the avatar:
    MyDCA.ForceUpdate(true); // rebuild the DNA without rebuilding the whole character.
     
    Last edited: Feb 4, 2019
  38. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    334
     
    LoekvanKooten and Jaimi like this.
  39. Hellwaiker

    Hellwaiker

    Joined:
    Jan 8, 2016
    Posts:
    69
    Hi,
    Is it a bad idea to equip base body & head model as a wardrobe recipe on a character?
    Would this limit expression animations or anything else?
     
  40. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    It should work, haven't done it though. Body and head is no different than clothes.
     
  41. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    Fantastic, that works!
     
    kenamis likes this.
  42. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    So, any idea why the Wanderer Scarf from the RPG Starter Pack makes the Simple Setup crash?

    Also, with both UMA RPG Starter Pack 1 & 2, the menus of the Simple Setup no longer fit on the screen, so that you can't choose every option.
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    What is it saying in the console? Probably something isn't indexed or setup right.

    It's just sample code, meant to show how to add/remove wardrobe recipes, setup a DCA, etc. You can add a scrollbar to the panel, or simplest thing is to just lower the scale factor on the Canvas Scaler.
     
    LoekvanKooten likes this.
  44. Hellwaiker

    Hellwaiker

    Joined:
    Jan 8, 2016
    Posts:
    69
    Thanks!
     
  45. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    Code (CSharp):
    1. Overlay 'Wanderer scarf Color' missing required texture in channel 0
    2. UnityEngine.Debug:LogError(Object)
    3. UMA.OverlayData:Validate(UMAMaterial, Boolean) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/OverlayData.cs:222)
    4. UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:276)
    5. UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:449)
    6. UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:236)
    7. UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:189)
    8. UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:272)
    9. UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
    10. UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:97)
    11.  
    12. Invalid Overlay 'Wanderer scarf Color' on Slot 'M_Wanderer Scarf'.
    13. UnityEngine.Debug:LogError(Object)
    14. UMA.SlotData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/SlotData.cs:280)
    15. UMA.UMARecipe:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:449)
    16. UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:236)
    17. UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:189)
    18. UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:272)
    19. UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
    20. UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:97)
    21.  
    22. UMAData: Recipe or Generator is not valid!
    23. UnityEngine.Debug:LogError(Object)
    24. UMA.UMAData:Validate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAData.cs:252)
    25. UMA.UMAGeneratorBuiltin:HandleDirtyUpdate(UMAData) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:189)
    26. UMA.UMAGeneratorBuiltin:OnDirtyUpdate() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:272)
    27. UMA.UMAGeneratorBuiltin:Work() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:132)
    28. UMA.UMAGeneratorBuiltin:Update() (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMAGeneratorBuiltin.cs:97)
    29.  
     
  46. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    Why doesn't the DNA randomize at all?

    If I put a string statement in the foreach, nothing is printed, as if there are no elements or whatsoever. This while avatar.SetSlot("Hair", hairString) right above it does exactly what it needs to do. Has something changed in the syntaxis?

    I don't see any color difference either, and yes, SharedColorTables have been attached.

    Code (CSharp):
    1.  
    2.             if (isDynamic == true && haveIRandomized == false && avatar == true)
    3.             {
    4.                 setters = avatar.GetDNA();
    5.                 print("Setters: " + setters);
    6.                 int randomHairNumber = Random.Range(1, 10);
    7.                 string hairString = "MHair" + randomHairNumber;
    8.                 avatar.SetSlot("Hair", hairString);
    9.  
    10.                 // Set random DNA
    11.                 setters = avatar.GetDNA();
    12.                 foreach (KeyValuePair<string, DnaSetter> dna in setters)
    13.                 {
    14.                     float newValue = 0.35f + (Random.value * 0.3f);
    15.                     dna.Value.Set(newValue);
    16.                     print("DNA " + dna + " set to " + newValue);
    17.                 }
    18.  
    19.                 // Set random colors
    20.                 int RandHair = Random.Range(0, HairColors.colors.Length);
    21.                 int RandSkin = Random.Range(0, SkinColors.colors.Length);
    22.  
    23.                 print(gameObject.name + ": " + hairString + " " + RandHair + " " + RandSkin + " " + RandEyes + " " + RandClothing);
    24.  
    25.                 avatar.SetColor("Hair", HairColors.colors[RandHair]);
    26.                 avatar.SetColor("Skin", SkinColors.colors[RandSkin]);
    27.                 avatar.BuildCharacter(true);
    28.                 avatar.ForceUpdate(true, true, true);
    29.  
    30.                 haveIRandomized = true;
    31.             }
    32.  
     
    Last edited: Feb 5, 2019
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    The error is here:

    Overlay 'Wanderer scarf Color' missing required texture in channel 071

    Sometimes Unity loses references to objects. This can happen when assets are saved in a different version of unity, and imported in a newer version. It's not common, but it does happen.
    To fix this, Find the overlay "Wanderer Scarf Color". You can either search for it in your project, or find it in the Global Library (hit the i button in the global library). In the inspector, expand the Texture List section if it is not already open.

    You will see that one or more of the textures are missing. You will need to add them back.

    Its also possible that the wardrobe recipe is just plain bad. The Wanderer should have shipped with an updated Version of the recipe. If you are using the one from the standalone wardrobe recipe download, it's quite possible there is no color version for that scarf. If that is the case, simply open the Wardrobe Recipe for the scarf from the global library, and remove the color overlay.

     
  48. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    That's a standard download from Will (whom I'm haven't heard from yet), so it looks like a bug in the RPG Starter Pack 1. I now see that the prefab is pink too. I deleted the accent color and now that works!
     
  49. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,774
    The DNA is only available after the character has been built - that's because the UMAData has not been constructed yet, and it doesn't know what race it is or will be.

    To randomize DNA, you have to have built the character at least once. Since this happens out of band, you have to do this in the Character Created event.

    (note: you can of course load characters that have modified DNA - this is only if you want to programatically randomize DNA).




     
  50. LoekvanKooten

    LoekvanKooten

    Joined:
    Apr 3, 2017
    Posts:
    120
    I have now attached the above to Character Created. That works now, and I see the changes in the DNA, including the hair colors and everything, in the Inspector, but despite

    Code (CSharp):
    1.                 avatar.BuildCharacter(true);
    2.                 avatar.ForceUpdate(true, true, true);
    ...the changes are not visible. The character refuses to update and I get no errors.
     
    Last edited: Feb 5, 2019