I’m trying to access the “Use High Precision Tangent Basis” variable (as shown below in the Editor) but from C++, when I spawn an Actor tagged with “highPrecision” into the level.
I’ve found a way to access the static mesh build settings through [FStaticMeshSourceModel:][2]
bool result = newMeshComponent->SetStaticMesh(LoadMeshFromPath(FName(*meshPath)));
if (result)
{
if (setHighPrecision)
{
UStaticMesh* precisionMesh = newMeshComponent->GetStaticMesh();
FStaticMeshSourceModel& srcModel = precisionMesh->SourceModels[0];
srcModel.BuildSettings.bUseHighPrecisionTangentBasis = true;
}
}
I’ve tried to find a way to “save” this setting as you would in the Editor, and scoured the docs, but no matter what I try, the static mesh never has high precision tangents applied.
Am I on the right track here? Would appreciate any suggestions! Thanks,
Hi , yes I did actually. As the code above is being run through a commandlet inside a plugin I can just put the block between #if WITH_EDITOR and #endif and then save the mesh using: