I’ve moved it to static function and it still works fine.
Can you show me where you use it? Also, double check if path is correct. I see that your variable for path is named ‘materialPath’ yet, you’re searching for static meshes. Dunno if you didn’t overlook it somewhere and you maybe still passing path to material or smth.
Afaik this method won’t work for absolute path of a file. It expects a relative path of an asset in current project.
If the file you’re trying to load is in project where you use that function, then you could convert that path to a relative one that is acceptable by this function.
Upgraided VS to 2015 and tried exactly your code into blank 3Dcharacter but it doesn’t work at all. Idk man… What is going on here) This bug drives me crazy.
Wtf… How… Emm… “/” instead “” ? What is the Testmat.TestMat? And if only have ***.uasset files?
Ok whatever. What about StaticMesh? Could you add static mesh component at character?
This function will work only for asset files, yes.
If you want to search for static mesh using this, simply change UMaterial to UStaticMesh.
TestMat.TestMat is… a way references to assets are represented in UE4. I don’t know why to be honest. Basically you have to repeat your asset name after a dot. So since I was searching for material called ‘TestMat’, my path contained ‘[…]/TestMat.TestMat’ at the end.
Where could I found this information about different backslashes and this ■■■■ extensions… wtf((( It took me 2 weeks to solve this problem! Nobody told me about proper path format… All specs tried to offer a different solution and noone didn’t look to the essence. LMAO ))
Thank you anyways) You’re the best, man)