Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal values from Json equals 0 #2

Open
kandohar opened this issue Sep 13, 2021 · 1 comment
Open

Decimal values from Json equals 0 #2

kandohar opened this issue Sep 13, 2021 · 1 comment

Comments

@kandohar
Copy link

kandohar commented Sep 13, 2021

I'm using this project in my HDRP Unity project instead of the DLL to import CC models.

By default, after an import, all the materials are black and almost no values are set.

For example, adding the line:
Debug.Log(kMaterialJson.ToJson()); at line 1090 in RLEditor.cs will log:
{"Material Type":"Pbr","MultiUV Index":0,"Two Side":true,"Diffuse Color":[0,0,0],"Ambient Color":[0,0,0],"Specular Color":[0,0,0],"Opacity":0,"Self Illumination":0,"Textures":{"Metallic":{"Texture Path":"","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Base Color":{"Texture Path":"./OldBG.fbm/Ga_Skin_Body_Pbr_Diffuse.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Roughness":{"Texture Path":"","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Opacity":{"Texture Path":"./OldBG.fbm/Ga_Skin_Body_Pbr_Diffuse.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Blend":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_blend_multiply.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0],"Blend Mode":"Multiply"},"Normal":{"Texture Path":"./OldBG.fbm/Ga_Skin_Body_Pbr_Normal.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"Reflection":{"Texture Path":"","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"AO":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_ao.tga","Strength":0,"Offset":[0,0],"Tiling":[0,0]},"MetallicAlpha":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_MetallicAlpha.tga"},"HDRP":{"Texture Path":"./textures/OldBG/OldBG/CC_Base_Tongue/Ga_Skin_Body_Pbr/Ga_Skin_Body_Pbr_HDRP.tga"}}}

As you can see, the Json parser is not able to read the decimal values, but the string are correct (e.g. Path).
Is it a LitJson library problem or am I doing something wrong?


Unity 2020.1.8f1
HDRP 8.2.0

@kandohar
Copy link
Author

Ok, I updated the LitJson.dll to the latest found on their Github: v0.17.0 and it solves my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant