Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question How to apply one material to multiple objects at project level

Discussion in 'Editor & General Support' started by kharling, Oct 20, 2022.

  1. kharling

    kharling

    Joined:
    Jul 15, 2020
    Posts:
    12
    I have several assets that use the same material. We reuse these assets so I like to have the material setup at the project level to avoid having to find the material when the asset is brought into a scene or prefab. However Unity does not allow material editing on multiple selections. Having to highlight one asset at a time select the material and apply it is really slowing down my workflow. Even using On Demand Remap is just as slow as manually adding it. Is there any way (maybe a script or tool I could download) to speed up this process and edit multiple assets at the same time?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,421
    You could just write a little editor script to do it.

    I would write it as:

    - iterate selected prefabs / assets

    - do the steps to each one

    Then select 'em all and go.

    Don't even consider doing the above unless you are using source control properly or you might destroy your entire project with an editor script gone haywire. :)
     
    Homicide likes this.
  3. kharling

    kharling

    Joined:
    Jul 15, 2020
    Posts:
    12