MarkRenderStateDirty() has no effect ?

Hello,

I’m using a few lines of code that were designed to toggle the display of some meshes attached to my Pawn. The code was mentioned during the beta in this thread : Toggle "bOwnerNoSee" ingame? - Programming & Scripting - Epic Developer Community Forums

It seems since the version 4.4.0 (I’m in 4.4.1 currently) it has no effect anymore. I tried many of the associated functions but I’m unable to update my skeletal mesh component. Basically I would like to toggle bOwnerNoSee, even in the default constructor of my Character it has no effect (the mesh is visible whatever value I give to bOwnerNoSee).

IsRenderStateCreated() always return false, no matter what function I call :

		MeshPants->MarkRenderStateDirty();
		MeshPants->MarkRenderTransformDirty();
		MeshPants->MarkRenderDynamicDataDirty();
		MeshPants->RecreateRenderState_Concurrent();

What is the correct way now to specify that I want to update the render state of a component ? From what I can read from the commentary in the source code (in Source/Runtime/Engine/Private/ActorComponent.cpp ), I’m calling the right functions…

Okay, I found my issue. :slight_smile:

bOwnerNoSee was relevant before because of my previous camera system. Since now I use an independent actor, this variable doesn’t mean anything to my camera. I switched to bOnlyOwnerSee instead and now I get the expected behavior. I don’t know if switching to 4.5.0 solved half of the problem has now IsRenderStateDirty() is returning an expected value (not always false).