Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

MODO Material Importer broken

Discussion in 'Editor & General Support' started by LudwigVRtualX, Jan 23, 2019.

  1. LudwigVRtualX

    LudwigVRtualX

    Joined:
    Oct 15, 2018
    Posts:
    11
    Hello,

    I am trying to use the MODO Material Importer script from the asset store with Unity 2018.3.2f1, however it does not correctly set Albedo, Metallic and Smoothness anymore. The Values are beeing set way too high (Metallic 2 instead of 0.2) and I cant figure out how to fix the script.

    It works in Unity 2018.1.3f1 but due to an unrelated bug in that version, I had to upgrade to 2018.3.

    Could someone with more knowledge have a look at the script? What changed about unity material properties from 2018.1 to 2018.3?

    Best regards
    Ludwig
     
  2. LudwigVRtualX

    LudwigVRtualX

    Joined:
    Oct 15, 2018
    Posts:
    11
    I actually managed to debug the script.

    Here is what I did:

    Add "using System.Globalization;" at the top.

    Change "EditorGUILayout.ColorField(new GUIContent("Albedo Color"), mat.getDiffuseColor(), false, false, false, null);"
    into "EditorGUILayout.ColorField(new GUIContent("Albedo Color"), mat.getDiffuseColor(), false, false, false);"

    Change "success = float.TryParse(elements[e], out output[e]);"
    into "success = float.TryParse(elements[e], NumberStyles.Any, CultureInfo.InvariantCulture, out output[e]);"