Hello,
I am currently writing a plugin to generate a scene from a json file and elements in the content file.
I’m having a couple problems loading a material and a mesh from the content drawer.
I am currently using:
UStaticMesh* MeshPtr = FindObject(ANY_PACKAGE, TEXT(“StaticMesh’/Game/DataBase3D/Oued_V1_projected.obj”));
To load a mesh. THis return a null UStaticMesh. Is there a better way to assign a mesh to an object in the scene.
I’m also having a problem with assigning a UMaterial where a UMaterialInterface is demanded.
auto mc = NewMesh->GetStaticMeshComponent();
mc->SetMaterial(0, Mat);
Is there a way to pass a UMaterial istead.