Download

Generating a scene proxy after calling Set TileMap (PaperTileComponent)

I am currently playing around with C++ and I have been using version 14 (I havn’t had time to update).
Right now I have a edit anywhere Paper Tile Map Property. I Use the PostEditProperty function to set the tilemap on the actors component.


void ATilemapActor::PostEditChangeProperty(FPropertyChangedEvent & e)
{
	FName PropertyName = (e.Property != NULL) ? e.Property->GetFName() : NAME_None;

	if (PropertyName == GET_MEMBER_NAME_CHECKED(ATilemapActor, tileMap))
	{
		tileMapComp->SetTileMap(tileMap);
		
	}
}

Right now this results in no scene proxy (I think this is the correct term) rendering in the editor.

If I set the tilemap property (On the tile map component) in the details panel, then it builds the mesh as you would expect it to behave. But calling SetTileMap does not have the same effect. I’ve looked at the source code for the engine but I’m struggling to find what cause the tilemap component to create its representation in the scene, I’ve found some stuff to do with Scene Proxies but right now it just causes the engine to crash.

My Questions are this:

Is it a scene proxy im trying to create?

How do the PaperTileMap create a scene proxy?