UE4 Note : Get Resource In C++

Firstly, you can right click on the resource you want and select “Copy Reference Path" in UE4 Editor. Than you should got a path like this:

After that, just delete the thing that should not include in an URL:

The last thing is using the Object Finder to get the object in C++:
#include "ConstructorHelpers.h"
StaticMesh * Mesh = ConstructorHelpers::FObjectFinder("/Game/Mesh/TestMesh.TestMesh").Object;



WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s