Hi guys,
another day, another thread with a questionI really tried hard to find more information about this, but no success :/
In a few previous threads I asked about spawning a DynamicSMActor_Spawnable during gameplay which worked out fine. But now I've come to another problem.. when I spawn about 200++ Blocks of the DynamicSMActor_Spawnable Class, the performance drops.
Then I search uncodex for some cool parameters which would help me with instancing so I came to the InstancedStaticMeshComponent. As far as I have seen the rendering information ingame, the problem are the StaticMeshComponents of the DynamicSMActor_Spawnable, cause they are drawn seperatly. I read about this stuff, and the possibility to call the draw call only once for a staticmesh and then use its instances, which will improve the performance greatly.
My DynamicSMActor_Spawnable class looks like this:
Now I've tried to change the Object in the defaultproperties to Class=InstancedStaticMeshComponent... without success... the compiler doesn't throw any error, but no mesh is showing up.Code:defaultproperties { Begin Object Class=StaticMeshComponent Name=TestSMComp StaticMesh = StaticMesh'BlocksPackage.DefaultBlock46' LightEnvironment = MyLightEnvironment BlockRigidBody=true CollideActors=true BlockActors=true End Object CollisionComponent = TestSMComp; StaticMeshComponent = TestSMComp; Components.Add(TestSMComp); bMovable=false }
In the Unreal Editor I set the option "Used for instancing" of the DefaultBlock46 to true, but it doesn't help :/
I think I have to tell the StaticMeshComponent, that it should be instanced.. but I really have no idea how...
Probably anyone has made any experience with this and could help meThanks a lot!
Eisregen



I really tried hard to find more information about this, but no success :/
Reply With Quote



Bookmarks