I’m attempting to have all assets within a given folder load automatically. The locations get loaded into a TArray and then I use them in this cast call
Cast<UStaticMesh>(StaticLoadObject(UStaticMesh::StaticClass(), NULL, *output[1]))
*output[1] is just referencing the index in the FString array where the location is stored. The problem I’m running into is that usually when I would call the cast it would read something like this:
Cast<UMaterial>(StaticLoadObject(UMaterial::StaticClass(), NULL, TEXT("StaticMesh'/Game/Environment/Floor/Materials/Water.Water'"
It appears to be expecting “Water.Water” not “Water.uasset” Which is what my function fetches. Is there a simple way to get this instead, or do I need to write something up to chop the extension off and add “.repeatNameOfAsset” ?