Assigning Materials

I was looking through the forums and documentation, and couldn’t seem to find an answer to this.

I have two similar objects that I want to share the same material. Is there a way to use a material created for one object for another object (with only one material, not duplicating that material)?

I’m sure the answer is yes, but I simply can’t figure out how to do it. It has a location for a texture, but if I add a texture, it creates a new material, and I only want to use one material between the objects.

If you’re using one material between two objects, it will have to have the same texture and other properties unless you modify it at runtime via scripting. Does that help?

Note that if you modify the material of one object at runtime, Unity creates a new instance of it for you (you can see this in the “* Scene *” section of a material pop-up menu). In order to be truly shared, materials on different objects have to be 100% identical.

–Eric

Ok, so I can’t simply assign a material to an object.

Shame.

Thanks for the replies.

Unless I read the OP wrong, this is completely possible. Follow the material node back to the project view, where its a little sphere graphic, and drag that onto second model. Now if you mess with the texture or shader both should update.

Im sure thats what I just read-coffee is ozmosising thru my brain as I type :slight_smile:

HTH
AC

Well, you can…just drag the material onto any objects you want to have that material.

–Eric

gah. I’m dumb. I was trying to drag the materials onto the objects in the project folder, not the scene/hierarchy.

thanks.

Dear Eric

You say:
Well, you can…just drag the material onto any objects you want to have that material.

Can you tell me,
how to assign a material to multi object at ones
I trying assign material to multi object form scene/hierarchy
But only one effect…

At the moment Unity doesn’t have any built-in multi-select feature, so you have to do one at a time, unless you write some kind of editor script.

–Eric