How to share one material with all my objects ?

Klo Works
Klo Works polycounter lvl 9
what I remember when I import fbx to unity, it show the material and its already applied to all my assets...

now it feel weird is this a new workflow ? kind annoying do I need to apply the material one by one ? 



I am really confuse I try to figure it out but Iam lost 
how canI apply "cells_m" to my all assets ? 


Welcome!

It looks like you're new here. Sign in or register to get started.

Replies

  • Did you try searching??

    I searched "unity help fbx material" and this was the fourth result.

    https://answers.unity.com/questions/41209/fbx-material-confusion.html
  • Klo Works
    Klo Works polycounter lvl 9
    edited Sep 2019
    I search but I didnt find a good answer...
    in the past when I import like 4 or 5 fbx file with one material shared.
    in unity will put all the asset and one material "this material if I change, it will change all assets.
    but not anymore.
    now when I import to unity each assets they have their own material with same name ? 

    I want to change the color it only change for one object not all which mean I need to go to each one and apply the material .



    is this a new workflow that now I need to apply one by one or is there something I didn't get it ?
  • Klo Works
    Klo Works polycounter lvl 9
    edited Sep 2019
    ok I just found a way to change it to Legacy and the material a appear ...but I need to change to legacy one by one which is tiring.


  • .Wiki
    .Wiki polycounter lvl 8
    edited Oct 2019
    You can add a editor script that overrides the default import behavior.

    I don´t know if the code below still works. I used it for a old project some years ago because a lot of assets used the same materials. And i´m a lazy guy and didnt wanted to change the materials for each mesh on the import manually.

    You need to put it inside of Assets/Editor/ to work.

    Edit: Polycount, what are you doing with the code formatting...
    1. <div><br></div><div><div><div>using UnityEngine;</div><div>using UnityEditor;</div><br><div>public class MeshProcessor : AssetPostprocessor {</div><div> void OnPreprocessModel()</div><div> {</div><div> ModelImporter importer = assetImporter as ModelImporter;</div><div> importer.globalScale = 10;</div><div> importer.importMaterials = true;</div><div> importer.materialName = ModelImporterMaterialName.BasedOnMaterialName;</div><div> importer.materialSearch = ModelImporterMaterialSearch.Everywhere; }</div><div>}</div></div></div>


  • Hito
    Hito interpolator
    edited Oct 2019
    you can group select and set all their material settings to the same.
  • With unity 2019.1+ you can define presets and then set those as the default values for importing new assets:




    This way you can make sure that your newly added fbx files will be imported the way you want (with legacy settings) and also other team members won't have any issues.

Welcome!

It looks like you're new here. Sign in or register to get started.