Hello, I’m trying to create a filter for a game in the real world, but I need dynamic instantiation to clone and destroy a 3d object. I’ve done tests with flat objects and text. But how do I do it with 3D object?
I think the only way is to use Block instancing.
Exactly, block instancing! It works similarly, but you use the
For what it’s worth, the dynamic instantiation eats up a ton of resources. I’ve had trouble getting it to work well in practice. If you are looking for a memory-efficient alternative, you can use an object pool and do the instance management with your own logic. It prevents the user from spawning an infinite number of objects, but the performance gains are very noticeable. I’ve had to do this for a lot of games that use object spawners.
I found a project almost ready, I’m just going to make some adjustments.