Loading Saved UMA with PackedLoadDCS issue
Hello. I am successfully creating and configuring my UMA characters with various slots in my game. I then save the UMATextRecipe.recipeString to a database where I can load it into my game when needed. All of this works fine. When I load the data to rebuild the character, it is exactly as I had saved it. However, if I try to change or add a wardrobe recipe nothing happens. Am I saving it incorrectly? Should I use a different method? I initially used the "old" style of loading the recipeString but unity logged warnings for me to use ImportSettings. Here are the steps I use generate the recipeString (saveString gets the value and puts it into a DB):
UMATextRecipe recipe = ScriptableObject.CreateInstance<UMATextRecipe>();
recipe.Save(avatar.umaData.umaRecipe, avatar.context);
String saveString = recipe.recipeString;
I then save it as a base64 String. Here is the code I use to rebuild my character:
byte[] recipeBytes = Convert.FromBase64String(characterRecipe);
String sRecipe = System.Text.Encoding.ASCII.GetString(recipeBytes);
avatar.ImportSettings(UMATextRecipe.PackedLoadDCS(avatar.context, sRecipe));
Again, it loads the character as I exactly saved it, but I can no longer configure it. Anyone have any insight?
Your answer
![](https://koobas.hobune.stream/wayback/20220612170614im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
mesh hide asset in UMA2 disappears 1 Answer
UMA2 - How do I change the avatar's lip color in code? 0 Answers
Saving UMA wardrobe recipe 0 Answers
Problem saving UMA avatar to text file via button onClick. 0 Answers
Uma2 mesh hider asset is not working 0 Answers