getting particle template material name when its missing

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
suny
Greenskin
Posts: 137
Joined: Thu Mar 12, 2020 5:53 pm
x 60

getting particle template material name when its missing

Post by suny »

I have particle scripts with missing material because of the architecture of my tool.
I want to read the particle script material name in order to create it at runtime, but when I do, the material name has been replaced with the "BaseWhiteNoLighting" default material during script compilation.

Is it possible to retrieve the real material name, or is it too late?
S.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1993
Joined: Sun Mar 30, 2014 2:51 pm
x 1073
Contact:

Re: getting particle template material name when its missing

Post by paroj »

you could register a ScriptCompilerListener and listen for the according ProcessResourceNameScriptCompilerEvent to create a dummy material to retain the original material name.
Post Reply