I have an event in my game that adds a lamp to my scene. When this event is triggered more than once, however, the next lamp instance is added but the previous lamp instance disappears.
Is this a bug? How can I spawn multiple lamp instances at once like with any other object?
will not be better recompiling these materials?
or at least have a function to call explicitely? (also if i guess will be better implicit)
ie:
bge.render.recompile_materials()
or something like that?
so, when you add or remove some lamp, you call explicitely the function.
NOTE: i not have idea how complex can be write this function (!)
i just say that if is just a problem of framerate (ie: you get lag when call this function)
is anyway MUCH better than now.
where you are forced to keep a number extremely low of lamps , and at most some “lamp hidden”
to spawn when need,
problem: this lamp “hidden” cost the same as a lamp visible.
so , as performances is not anything good the current state