Search Unity

Inspector / Mesh Renderer option greyed out? Trying to replace Material...

Discussion in 'Getting Started' started by Saiblade, Oct 10, 2016.

  1. Saiblade

    Saiblade

    Joined:
    Oct 10, 2016
    Posts:
    3
    Pretty new to Unity a lot of new things to get accustomed to. Been trying to find the solution on googles search, youtube video tutorials and within the Unity Documentation. Found a lot of workarounds but nothing concrete.

    How do exactly do I apply the pre made material I created to replace the material created during import of the model? These are coming from 3dsMax since it currently doesn't support PBR textures, I cant necessarily pre apply the textures. Nevertheless it would seem a bit redundant not being able to edit those properties within the engine. Am I missing something?

     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    What you have selected there is a subpart of an imported model in the project. You can't change that, because it's imported data — at best you could change the import settings (on the parent object).

    But once you instantiate such a model in the scene, then it's a GameObject, and you can override any properties you like. So, try selecting the weapon stand in the Hierarchy tab (not the Project tab), and replacing the material there.
     
    telferman and Kiwasi like this.
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This. A common way to do it is to make a prefab of the model. That way you can uniformly apply changes across multiple scenes.
     
    JoeStrout likes this.
  4. Saiblade

    Saiblade

    Joined:
    Oct 10, 2016
    Posts:
    3
    Well my goal here is to great a package for the Asset Store. It feels inconvenient to have to provide prefabs for every single mesh object in the project just so I can apply the correct material. This may even be bloating the project with unnecessary files.

    Am I Importing files incorrectly?
     
  5. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, it should be possible to have the materials automatically found by the importer provided they have the correct name and location. Study the import options — it explains there where it will be looking for the materials relative to the model itself.
     
  6. Saiblade

    Saiblade

    Joined:
    Oct 10, 2016
    Posts:
    3
    I looked into the import settings doc, there's definitely a setting for it look for a materiel before it creates one. For posterity, I applied a material in 3dsmax and as long as a material of the same name exists in Unity it will unify the assets regardless of texture content.
    I'm starting to get he feeling Unity is a very programmer inclined, as an artist I'm craving more intuitive features.
    Thanks a lot for the help! =D
     
    JoeStrout likes this.