How to update texture asset from c++ plugin in game?

I’ve created custom texture asset which gets updated in c++ runtime plugin. Asset is created using UFactory so it is working fine in editor only. Now I want to get this working on stand alone game, but UFactory does not build in game mode so I’ve to put all my UFactory code under WITH_EDITOR macro. I’ve implemented and exposed some custom APIs of this texture which are called from blue print but I can’t use these APIs or texture is not getting updated when I run stand alone game. Pls suggest me some solution.

How to access c++ class reference associated with texture asset in game? In editor it is done using UFactory method.

How come you use UFactory instead of calling NewObject?