# Reimport Logging not showing up

**URL:** <https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644>\
**Category:** Plugins\
**Tags:** unreal-engine, editor, question, CPP\
**Created:** [July 27, 2023, 12:31pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644 "2023-07-27T12:31:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kjasi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kjasi/32/690676_2.png) [@Kjasi](https://forums.unrealengine.com/u/Kjasi)\
**Post date:** [July 27, 2023, 12:31pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/1 "2023-07-27T12:31:10Z")

</div>

I’m writing a plugin to import custom assets as meshes, materials, and more. The importer is working just fine, but I’m often having to reimport data as I expand the supported formats, or fix issues I’ve found when reading the data. However, I can’t find a decent step-by-step tutorial for making a c++ reimport system that works. I got it so I can call the functions natively (using the built-in Reimport buttons) but every attempt to run the reimport function returns `EReimportResult::Failed`.

Now, normally, I would just log my way to a solution, but my current issue is that any call to `UE_LOG` fails to output anything when overriding `FReimportHandler::Reimport`. I have a log call at the very beginning of the function, (just to see if it’s running) and nothing shows up in my logs. As such, I can’t debug the issue.

Is there a solution where I can log a reimport function so I can debug it? Alternatively, can anyone think of why my override of `FReimportHandler::Reimport` wouldn’t be called?

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [July 27, 2023, 6:22pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/2 "2023-07-27T18:22:05Z")

</div>

Hi Kjasi,

Does it trigger a break-point if you set one there?

---

<div class="post-metadata">

**Author:** ![Kjasi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kjasi/32/690676_2.png) [@Kjasi](https://forums.unrealengine.com/u/Kjasi)\
**Post date:** [July 27, 2023, 6:52pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/4 "2023-07-27T18:52:05Z")

</div>

Huh, no it does not…

So it looks like when reimporting, it doesn’t even use the correct factory…

Should of realized this when every time I called reimport, it asks for a file to import… Now to figure out how to get it to use the correct factory when reimporting… Trying to follow the FBX and Alembic source codes as references…

Yeah, I’m not even getting logging for the `CanReimport` function…

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [July 27, 2023, 6:59pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/5 "2023-07-27T18:59:13Z")

</div>

What about in FReimportManager::CanReimport - does it trigger a breakpoint in there? Is your handler in the list?

---

<div class="post-metadata">

**Author:** ![Kjasi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kjasi/32/690676_2.png) [@Kjasi](https://forums.unrealengine.com/u/Kjasi)\
**Post date:** [July 27, 2023, 7:12pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/6 "2023-07-27T19:12:03Z")

</div>

No, it didn’t hit `CanReimport`. Nor `SetReimportPaths`. But it DID hit `GetPriority` like 11 times, but only AFTER it asked for the new file location.

What list are you referring to?

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [July 27, 2023, 7:15pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/7 "2023-07-27T19:15:03Z")

</div>

In Editor.cpp, the entry point for the CanReimport:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/4/1/a414c7e30bebad42df9a08818d376775d4b37c78.png)

---

<div class="post-metadata">

**Author:** ![Kjasi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kjasi/32/690676_2.png) [@Kjasi](https://forums.unrealengine.com/u/Kjasi)\
**Post date:** [July 27, 2023, 7:22pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/8 "2023-07-27T19:22:48Z")

</div>

Okay, how do I check that?

Wait, Think I have it…

Yes, my factory is listed in there. As is my FReimportHandler.

Edit: For people wondering how I checked the list, I set a breakpoint on that line in Editor.cpp, and checked the variables when the breakpoint hit.

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [July 27, 2023, 7:29pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/9 "2023-07-27T19:29:07Z")

</div>

Then it sounds like something earlier in the list is saying it can reimport it?

If you step through that part of the code you should be able to find what it is…

---

<div class="post-metadata">

**Author:** ![Kjasi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kjasi/32/690676_2.png) [@Kjasi](https://forums.unrealengine.com/u/Kjasi)\
**Post date:** [July 27, 2023, 7:35pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/10 "2023-07-27T19:35:20Z")

</div>

Ah! I think I found the problem! Another importer in the same plugin has `CanReimport` doing `return true`, so… Gonna fix it and see if that solves the issue.

---

<div class="post-metadata">

**Author:** ![Kjasi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kjasi/32/690676_2.png) [@Kjasi](https://forums.unrealengine.com/u/Kjasi)\
**Post date:** [July 27, 2023, 7:45pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/11 "2023-07-27T19:45:33Z")

</div>

That was the issue. It’s now calling the Reimport function & logging is working now! Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [August 26, 2023, 7:46pm UTC](https://forums.unrealengine.com/t/reimport-logging-not-showing-up/1241644/12 "2023-08-26T19:46:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
