i try to get my procedural Mesh working but currently i cant get my Material Set. I Got it in UE18.3 - so what changed?
i followed the Example here:
and added in Header:
UPROPERTY(EditAnywhere, Category = "Materials") UMaterial* My_Material_Variable;
added in Implementation
mesh->CreateMeshSection_LinearColor(0, vertices, Triangles, normals, UV0, vertexColors, tangents, true); // Enable collision data mesh->ContainsPhysicsTriMeshData(true); mesh->SetMaterial(0, My_Material_Variable);
i know that it wanted to have a MaterialInstance - but this does not change anything (both do not work ).
Also what happened to Material.Object - seems it isnt anymore?
The header Variable works just fine and as expected, but it is not assigning the Material to Element0
i tried to put it in BeginPlay - but it crashes there. In the constructor it isnt assigning the Material.
How can i get it working? have i forgotten an include?`(but there are no compiler errors)
thanks - Johannes