How can I import binary file as uasset?Will it change the file's content?

How can I import binary file as uasset?Will it change the file’s content?
I am using a third-party API to read the binary file in code,I am not willing to change the files’s content when it can be packaged like other uasset.
Thanks for help.

To import a file as an asset you will need a few things:

  1. Make UObject derived class that stores the data imported from the binary file (you might already have this).

  2. Make a UFactory derived class to manage the importing. Implement FactoryCreateBinary() to process the file’s contents. See UTextureFactory as an example. Make sure you set bEditorImport=true and bCreateNew=false in the constructor. Also fill out the Formats array and set the SupportedClass to the class you made in step 1.

  3. This is optional. Make an FAssetTypeActions derived class to provide the “Reimport” option when right clicking the asset in the content browser. See FAssetTypeActions_EditorUtilityBlueprint as an example of making one of these classes. You’ll need to register it in the StartupModule function for your module. An example of this is in BlutilityModule.cpp


We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.


it is ok!!