C++ : Access to Plugin Assets

Hi everybody
I need to load an asset to my project in C++, this asset is stored in my plugin folder and I’m trying to figure out how to access to it in the same way as you can access the Content folder assests with the keyword “Game”:

Project content asset path example
“/Game/FirstPerson/Textures/FirstPersonCrosshair”

how is it then for the plugins ?
“Plugin/AssetPath/PluginAsset” ???

thanks for the attention :slight_smile:

1 Like

Sure,

to load

To load “Game\Plugins\StickyNotes\Content\StickyNoteMaterials\m_yellow.uasset” ( this one in a pluggin in project, but works the same if plugin is just installed in engine )

i use
“/StickyNotes/StickyNoteMaterials/m_yellow.m_yellow”

So it match what you said.

Ussually i simply browse to my asset in UE and right click => Copy reference, and it’s good :slight_smile:

4 Likes

GREAT :slight_smile: Thank you very much !!

this is great!

This works in the editor but when I create a build the material is not found. Any ideas why? The material file is in the content directory of the plugin.