ah, awesome thanks guys. I was just manually trying out what I'd make the script do, and didn't realise that script control would automatically affect instances only. That does raise one other question though- what happens if I *do* want all materials changed? Do I just iterate all the objects and do it one by one? or is…
Hi, I have one more thought on this- lets say I'm creating some magic pillars, and I want to tint each one individually while placing them in the level, but they use the same material. Is there a way to do that manually instead of through script? would I need to include the material in the prefab for that to work? edit:…
As far as I know, you can't edit instances through the inspector. You'd need to create dupes of the material (using the same shader), and edit those individually. Of course, that's probably not exactly ideal, so your best bet would be to do it in script. And yup, a new material instance would mean an additional draw call.
what would be the practical downside to duplicating the material? I'm guessing that to Unity it doesn't make any difference, it's an extra material one way or another- do you just mean from a work perspective it'd be annoying to have the dupes in the hierarchy? the thing with doing it in script, won't I have to deal with…
Yeah, the downside would be more of a potential workflow and organisational thing. The more individual stuff you have, the harder it gets to start updating things. If you're happy enough with that (ie, if there are only going to be a handful of different material derivatives), then yeah, just duplicating the material in…
When you edit a material on an object and its linked to a Asset file it will change the asset file and have an effect on every other object using that material. If you want to create a unique instance in edit mode you can just copy the material asset and assign it to the renderer, or you can create an editor script that…