x


Mass assign shaders?

Is there a way to assign a shader to a group of materials?

cheers, ng

more ▼

asked Mar 17 '10 at 10:29 AM

N G gravatar image

N G
13 1 1 5

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Yes there is, via Editor Scripting.

Generally in the Unity Editor, if you want to "mass-do-something" you need an editor script to provide that functionality.

Edit:

There is an editor script to assign materials to objects, but not - as far as I can see - to assign shaders to materials.

The materials-to-objects script can be found here on the Wiki - along with a whole load of other very useful Editor Scripts which extend the functionality of the Editor. Perhaps one of them could be modified to fit your needs.

(I'm looking further into this because it would be useful for me too right now)

more ▼

answered Mar 17 '10 at 12:57 PM

duck gravatar image

duck ♦♦
41.4k 95 152 415

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1744
x841
x283
x96
x41

asked: Mar 17 '10 at 10:29 AM

Seen: 1443 times

Last Updated: Mar 17 '10 at 10:29 AM