GetScriptMaterial() - New Material?

Everything related to 3D programming
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: GetScriptMaterial() - New Material?

Post by Samuel »

Alexi wrote: does GetScriptMaterial() not created a new copy every time?
It's as you said GetScriptMaterial() doesn't load a separate material if used more then once.
In order to duplicate the script you'll need to use CopyMaterial() on the original.
That or define another material in the script with the same parameters.