Runtime material loading

Hey guys, I’m making a project for Android on Unreal to exhibit 3D models in a room. Right now Im working through a way to load models at runtime, so that I could fill a folder in Android with models and open any of them in the application. Im using Assimp to load the FBXs files (only format tested until now) and I already got the meshes from the model, now Im struggling to get the Material from that file (or at least import the texture so I can kludge something). I understand that Material is not strictly defined to 3D models in general, so there’s no direct way to import through assimp, so does anybody know how I can import this extra info from the model as a Material to Unreal at runtime?

Here’s my importer code until now:

bool UAssimpImporter::Load(const FString& FileDirectoryPath, const FString& FileName)
{

	FString FilePath(FileDirectoryPath);
	FilePath.Append(FileName);

	// getting Model file
	Assimp::Importer importer;
	const aiScene* scene = importer.ReadFile(TCHAR_TO_ANSI(*FilePath),
		aiProcess_CalcTangentSpace |
		aiProcess_Triangulate |
		aiProcess_JoinIdenticalVertices |
		aiProcess_GenSmoothNormals |
		aiProcess_FlipWindingOrder |
		aiProcess_FlipUVs |
		aiProcess_SortByPType );

	if (!scene) return false;

	// For each mesh
	for (unsigned int i = 0; i < scene->mNumMeshes; i++)
	{
		aiMesh* currentMesh = scene->mMeshes[i];
		for (unsigned int j = 0; j < currentMesh->mNumVertices; j++)
		{
			aiVector3D vertex = currentMesh->mVertices[j];
			aiVector3D normal = currentMesh->mNormals[j];
			aiVector3D uv = currentMesh->mTextureCoords[0][j];

			Vertices.Add(FVector(vertex.x, vertex.y, vertex.z));
			Normals.Add(FVector(normal.x, normal.y, normal.z));
			UVs.Add(FVector2D(uv.x, uv.y));
		}
		for (unsigned int k = 0; k < currentMesh->mNumFaces; k++)
		{
			aiFace face = currentMesh->mFaces[k];

			for (unsigned int l = 0; l < face.mNumIndices; l++)
			{
				Triangles.Add(face.mIndices[l]);
			}
		}
	}

	// Is scene contain materials ( Unless no special scene flags are set this will always be true )
	if(scene->HasMaterials())
	{
		UE_LOG(LogTemp, Warning, TEXT("Has material"));
		TArray<FString> Files;

		// Excluding extension from filename, so I can search for texture with same name, different extension
		FString NoExtName = FileName.LeftChop(FileName.Len() - FileName.Find(".", ESearchCase::IgnoreCase, ESearchDir::FromStart, 0));


		// Fills 'Files' with the found files with name NoExtName.* 
		SearchFileName(Files, FileDirectoryPath, NoExtName);

		for (unsigned int i = 0; i < scene->mNumMaterials; i++)
		{
			const aiMaterial* material = scene->mMaterials[i];
			int texIndex = 0;
			aiString path;  // filename

			if (material->GetTexture(aiTextureType_DIFFUSE, texIndex, &path) == AI_SUCCESS)
			{
				FString TextureName = path.data;
				FString TexturePath(FileDirectoryPath);
				TexturePath.Append(TextureName);

				UE_LOG(LogTemp, Warning, TEXT("TexturePath: %s"), *TexturePath);

				// Poorly attempt to load file, didn't think it was going to work anyway
				Texture = Cast<UTexture>(StaticLoadObject(UTexture::StaticClass(), NULL, *(TexturePath)));

				if (Texture)
				{
					UE_LOG(LogTemp, Warning, TEXT("TEXTURA SHOW DE BOLA"));
				}

			}
		}
	}

	return true;
}