Search Unity

Script for importing Adobe Fuse character model into Unity (fixes materials)

Discussion in 'External Tools' started by saulth, Jul 7, 2017.

  1. richyoung_readify

    richyoung_readify

    Joined:
    Feb 5, 2019
    Posts:
    3
    Hi truebototics,

    I needed to get this running in 2018.3 as well and have updated the script to work. Please find attached. As materials are now embedded in the model, had to make a few adjustments to the way it handles those. It will create two new materials for the eye and eyelashes.
     

    Attached Files:

    truebototics, fairtree and Shizola like this.
  2. richyoung_readify

    richyoung_readify

    Joined:
    Feb 5, 2019
    Posts:
    3
    Let me know if you run it and if you have any issues - I haven't tried the updated script with anything extra like gloves, masks etc - so YMMV.

    Huge thanks to @saulth for the original script - it was a lifesaver!
     
    fairtree likes this.
  3. richyoung_readify

    richyoung_readify

    Joined:
    Feb 5, 2019
    Posts:
    3
    Decided to create a version that extracted the materials out so that I could play around with them as required. Thought I'd put it up here as well.
     

    Attached Files:

    Flurgle, RedHermit, fairtree and 2 others like this.
  4. RedHermit

    RedHermit

    Joined:
    Oct 14, 2017
    Posts:
    1
    Thank you so much to @saulth and @richyoung_readify - I love this script and has worked great up to Unity 2018. I tried it in Unity 2019, and unfortunately it gives an error in all my tests.

    NullReferenceException: Object reference not set to an instance of an object
    MixamoUnityImporter._process_model (System.String character_name, System.String folder, System.String filename) (at Assets/Mixamo/Editor/MixamoUnityImporter.cs:295)
    MixamoUnityImporter.ImportCharacter () (at Assets/Mixamo/Editor/MixamoUnityImporter.cs:108)

    Line 295 is:
    model.transform.Find(mesh.name).GetComponent<SkinnedMeshRenderer>().sharedMaterials = shared_mats;

    Model is defined on 243:
    var model = (GameObject)PrefabUtility.InstantiatePrefab(asset, UnityEngine.SceneManagement.SceneManager.GetActiveScene());

    Honestly I was hoping to fix it and provide a working script for 2019.. unfortunately all my attempts, and Novice C# skills have failed.. If anyone has any thoughts on what may have changed in 2019 that the code isn't happy with, I'd be grateful for your input.
     
  5. milad-y

    milad-y

    Joined:
    Sep 30, 2018
    Posts:
    1
    It didn't work for me. It does not import any texture.