StaticMesh "WITH_EDITORONLY_DATA" not legally shippable?


In the game I am developing I require access to triangle data (in particular UV information from a triangle hit) and I need to save a particularly large mesh that is edited during loading (automated, not any ingame editor) into a uasset so I can load it faster during the next time the player opens the game.

Unfortunately the code that allows me to do this editing and UStaticMesh generation is locked with a “WITH_EDITORONLY_DATA” definition and I believe some of the code to take the mesh data and fill the right places is in the Editor folder.
As the intention is not to produce any sort “make a game” or editor, but merely to allow for caching of mod data, am I allowed to use code snippets from this feature, to generate the cache uasset?

Best Regards and my apologies for the long question,

You are free to modify the engine runtime code (static mesh loading/saving and data structures) to allow you to load and save meshes at runtime in your game. That includes removing or changing how WITH_EDITORONLY_DATA is used in your personalized version of UE4. You are allowed to change the engine however you’d like to get your game to work! :slight_smile:

However if any of that code required to load or save meshes correctly actually resides under the /Engine/Source/Developer or /Engine/Source/Editor subfolders, it technically would violate the EULA (even if you copied the code you needed.) Our intent with that restriction isn’t really to disallow saving (caching) of asset files by a game, so if you do find that editor-specific code is needed I’d be curious to hear about what snippets you’d need. (Ideally nothing!)


There is unfortunately quite a lot of code related to parsing meshes in both developer and editor. Maybe just my ignorance there in being unable to get through around all of it, in particular to get the specific data I need… I’ll try something else then, its quite annoying not being able to store mesh data at will in uassets. The same problem for DataTables, I can’t import a json file at runtime into DataTables because the code is in “editor” folder, even though I can easily just parse them myself into the same exact structure just not DataTable classes…
Thank you for your help nonetheless