chuckterzian (2/24/2023)
Hello, I'm using Unity 2022.2.5f1 and I downloaded and installed the newest version CC4 and the Unity Auto Setup and upon pressing the Build Material button I see a few errors, and things don’t look like they should.
Error type 1 (repeats for a few materials):
Unable to find json material data: Back_Loin/Materials/Top_2
UnityEngine.Debug:LogError (object)
Reallusion.Import.Util:LogError (string) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Util.cs:1119)
Reallusion.Import.CharacterInfGetMatJson (UnityEngine.GameObject,string) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/CharacterInfo.cs:413)
Reallusion.Import.Importer:ProcessObjectPrepass (UnityEngine.Renderer) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:425)
Reallusion.Import.Importer:ProcessObjectTreePrepass (UnityEngine.GameObject) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:406)
Reallusion.Import.Importer:Import () (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:258)
Reallusion.Import.ImporterWindow:ImportCharacter (Reallusion.Import.CharacterInfo) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importerwindow.cs:1115)
Reallusion.Import.ImporterWindow:BuildCharacter () (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importerwindow.cs:1184)
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
Error type 2 (only appears once):
NullReferenceException: Object reference not set to an instance of an object
Reallusion.Import.Importer.ConnectDefaultMaterial (UnityEngine.GameObject obj, System.String sourceName, UnityEngine.Material sharedMat, UnityEngine.Material mat, Reallusion.Import.MaterialType materialType, Reallusion.Import.QuickJSON matJson) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:988)
Reallusion.Import.Importer.ProcessTextures (UnityEngine.GameObject obj, System.String sourceName, UnityEngine.Material sharedMat, UnityEngine.Material mat, Reallusion.Import.MaterialType materialType, Reallusion.Import.QuickJSON matJson) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:760)
Reallusion.Import.Importer.ProcessObjectBuildPass (UnityEngine.Renderer renderer) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:385)
Reallusion.Import.Importer.ProcessObjectTreeBuildPass (UnityEngine.GameObject obj) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:352)
Reallusion.Import.Importer.Import () (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importer.cs:264)
Reallusion.Import.Importerwindow.ImportCharacter (Reallusion.Import.CharacterInfo info) (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importerwindow.cs:1115)
Reallusion.Import.Importerwindow.BuildCharacter () (at ./cc_unity_tools_HDRP-1.4.4.HDRP12/Editor/Importerwindow.cs:1184)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <00d63564201b48698d51680c10078897>:0)
Please advise on what I need to do to fix this or if there is a fix on the way. Thank you!
That's interesting, there's a mis-match between the object and/or material names in the character Fbx with the object/material names in the JSON data.
It's looking for an object called
Back_Loin with a material called
Top_2, but they don't seem to exist in the Json data.
So it can't find the data to set up the characters materials correctly. (And then it hits a null reference and just gives up at that point)
I think this might be an old export bug in CC3/4 when there's a space in the material or object name and it writes the wrong name into the Json data.
The null reference is easy to fix, but why don't the names match up? Can you attach the json data file for the character? There might be a way to work around it.