So I am doing some dynamic loading and assignment of meshes and materials.
ObjectMesh->SetStaticMesh(Cast<UStaticMesh>(StaticLoadObject(UStaticMesh::StaticClass(), NULL, TEXT("StaticMesh'/Game/Meshes/Park/Mesh_Bench.Mesh_Bench'")))); ObjectMesh->SetMaterial(0, Cast<UMaterialInstance>(StaticLoadObject(UMaterialInstance::StaticClass(), NULL, TEXT("MaterialInstanceConstant'/Game/Materials/Park/MI_Park.MI_Park'"))));
This works fine in play mode and in mobile preview, but in HTML5 and deploying to Android device, some meshes are invisible (like the one above). The HTML5 console gives the error listed below for instance:
[2015.03.03-18.35.43:977] 0]LogLinker:Warning: Can't find file '/Game/Meshes/Park/Mesh_Bench' [2015.03.03-18.35.43:980] 0]LogUObjectGlobals:Warning: Failed to load '/Game/Meshes/Park/Mesh_Bench': Can't find file '/Game/Meshes/Park/Mesh_Bench' [2015.03.03-18.35.43:982] 0]LogUObjectGlobals:Warning: Failed to find object 'StaticMesh /Game/Meshes/Park/Mesh_Bench.Mesh_Bench'
I know for a fact that mesh exists in that folder. Capitalization is the same. I have other meshes in the folder that sometimes load no problem, sometimes don’t. I’ve tried removing the “StaticMesh’’” portion to no effect.