# How do I handle when FactoryCreateFile has multiple types but only one Extension

**URL:** <https://forums.unrealengine.com/t/how-do-i-handle-when-factorycreatefile-has-multiple-types-but-only-one-extension/1114773>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, editor, question, CPP\
**Created:** [April 18, 2023, 5:06pm UTC](https://forums.unrealengine.com/t/how-do-i-handle-when-factorycreatefile-has-multiple-types-but-only-one-extension/1114773 "2023-04-18T17:06:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![superpepper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@superpepper](https://forums.unrealengine.com/u/superpepper)\
**Post date:** [April 18, 2023, 5:06pm UTC](https://forums.unrealengine.com/t/how-do-i-handle-when-factorycreatefile-has-multiple-types-but-only-one-extension/1114773/1 "2023-04-18T17:06:05Z")

</div>

Example: I have two json files ,but their types are different。I have two factory class. but i class return nullptr, the other class will not run.

---

<div class="post-metadata">

**Author:** ![superpepper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@superpepper](https://forums.unrealengine.com/u/superpepper)\
**Post date:** [April 19, 2023, 3:36am UTC](https://forums.unrealengine.com/t/how-do-i-handle-when-factorycreatefile-has-multiple-types-but-only-one-extension/1114773/2 "2023-04-19T03:36:15Z")

</div>

Factory had a function named FactoryCanImport. condition logic can write in this.In my example i can write Deserialize function and check if it is my type.
