# Hooking into UFbxFactory::FactoryCreateBinary()

**URL:** <https://forums.unrealengine.com/t/hooking-into-ufbxfactory-factorycreatebinary/46216>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [October 30, 2015, 11:18pm UTC](https://forums.unrealengine.com/t/hooking-into-ufbxfactory-factorycreatebinary/46216 "2015-10-30T23:18:00Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![NegInfinity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NegInfinity](https://forums.unrealengine.com/u/NegInfinity)\
**Post date:** [November 5, 2015, 6:46am UTC](https://forums.unrealengine.com/t/hooking-into-ufbxfactory-factorycreatebinary/46216/21 "2015-11-05T06:46:56Z")

</div>

> [@Antidamage;414257](#):
>
> So if I follow this correctly, a new asset that I want to import doesn’t need a package created and supplied, it’s only a reference for existing content? What should I use as the outer if I’m not using a package?

o\_O

You attempt to load the object using path. If no object is found, you create package. You then pass the created package into factory function. You then call FAssetDatabase::AssetCreated and yourPackage-\>setDirtyFlag(). You can do that from within editor (or editor plugin), not sure about game runtime.

> [@Antidamage;414257](#):
>
> Ahahaha, got it. It was the name sanitation.

You should use ObjectTools::SanitizeObjectName and PackageTools::SanitizePackageName.

Dot is (apparently) used by unreal to separate package path from object name.

[Previous page](https://forums.unrealengine.com/t/hooking-into-ufbxfactory-factorycreatebinary/46216.md?page=1)
