How to transform a texture asset to a slate brush in the function?

Now I can complete it in the event. But how can I do it in a function?

You can do that in fucntion due to fact that Load Asset is laten action node (has that clock icon) it means it breaks the code thread and continue to do other things and wait for event and when this happens function handle memory is cleared and cannot continue the function later.

You either need to remove Load Asset or use macro to compress this circuit to reusable single node, it looks like function but all it does is paste code in place of that single node.

How should I get texture 2D from texture asset without Load Asset?

Anyway that don’t use load asset node in function, maybe oyu will need to leave as it is, or use Bluepinr macro to make it more compact. Hmmm you could check if Load Asset event can be find in as override function, but i’m not sure