In my project i need to clone the same object a lot of times and then change their individual diffuse and emissiv textures. Other textures like lightmaps should stay the same.
Problem is, when i clone and assign my material (so the instances/clones dont share the same mat anymore) the new materials lose their other maps.
I’m pretty sure the reason for this is that the textures aren’t fully loaded yet and the material is using placeholders to function.
There have been topics in the past, but i just can’t wrap my head around their solutions or they arent applicable in my case.
All i want to do is:
find out which textures are needed
load them
clone the material
Also, please understand i cant use “FindAssetByName” because of internal reason and i cant preload the textures!
Thanks for the reply!
But unfortunately we cant say WHICH objects and materials will be used. That’s decided by the user at runtime.
We have roughly 70 different objects and are still adding new ones, i think this solution just isnt suitable
In this case, you can map the option to a tag. Eg they select the button to use pattern A, all the textures/materials/assets related to pattern A can be tagged as such and then checked at runtime
You can also multi-select assets to tag multiple at once
Please note the method above is private API and may break in any future release of the engine