In 5.5, 'bDisallowMeshPaintPerInstance' is no longer a member variable of 'UStaticMeshComponent'
.
Is there a replacement? Has the variable been removed? Bug?
I don’t see it listed in the documentation:
In 5.5, 'bDisallowMeshPaintPerInstance' is no longer a member variable of 'UStaticMeshComponent'
.
Is there a replacement? Has the variable been removed? Bug?
I don’t see it listed in the documentation:
More specifically, this code results in an error:
UInstancedStaticMeshComponent* TargetComponent = nullptr;
TargetComponent->SetStaticMesh(Component->GetStaticMesh());
TargetComponent->bDisallowMeshPaintPerInstance = true;
VS Error:
‘bDisallowMeshPaintPerInstance’: is not a member of ‘UInstancedStaticMeshComponent’
in the source you can see
/** Deprecated. Use bEnableVertexColorMeshPainting instead. */
UPROPERTY()
uint8 bDisallowMeshPaintPerInstance_DEPRECATED : 1;
So this should replace it with bEnableVertexColorMeshPainting (but it’s the opposite bool val):
UInstancedStaticMeshComponent* TargetComponent = nullptr;
TargetComponent->SetStaticMesh(Component->GetStaticMesh());
TargetComponent->bEnableVertexColorMeshPainting = false;
It’s best to always look for the variable in the source code of the engine for changes. Though most of the time direct access to bools is phased out in favor of a private variable with setters and getters.