I am currently looking for a way to choose a particle effect based on the object material. For example:
var material = wood;
//material could be one of many other values
<material>Particles.Emit();
Essentially if the material was wood it would emit woodParticles (assigned earlier in the code) if it was metal it would emit metalParticles.
Thanks, Langy
This is what I was after yeah, is the above the correct syntax for it? i.e. if Material was "wood" and I wrote: -material- + "Particles".Emit(); it would emit the wood particles? Thanks
– LangynomId personally do several prefabs each with each type of particle, then add them to an array of GameObjects then Instantiate the prefab i found by name (not the best way, but thats what i can think of right now, sorry i cant delve much deeper on the solution, im currently at work :P
– emongev