x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Bug when hot-reloading custom NavArea classes

I experienced the same problem as in this question and further investigated it a bit (with the help of some logging)

By doing that I noticed that when hot reloading a project with a custom NavArea class, it calls FinishDestroy() after calling PostInitProperties() which should register the new implementation. This will result in the custom NavArea class in not being registered at all and as a consequence rebuilding the nav mesh will show the following error:

 "FRecastTileGenerator: Trying to use undefined area class while defining Off-Mesh links! (NavArea_Jump)"

I found only two solutions for now:

  1. Restart the editor after compiling the code each time

  2. Overwrite FinishDestroy() in the custom NavArea class so it skips unregistration

The first one is a massive impact on productivity so I wouldn't call that a solution.

The second one can be achieved with the following code in for example NavArea_Jump. However it might have unknown side-effects and when removing the custom NavArea class from the code, the editor should definitely be restarted:

 void UNavArea_Jump::FinishDestroy()
 {
     if (HasAnyFlags(RF_ClassDefaultObject)
 #if WITH_HOT_RELOAD
         && !GIsHotReload
 #endif // WITH_HOT_RELOAD
         )
     {
         UE_LOG(LogTemp, Error, TEXT("Did not unregister %s, because of bug in UE4"), *GetClass()->GetName());
         // UNavigationSystem::RequestAreaUnregistering(GetClass());
     }
     UObject::FinishDestroy();
 }
 


Product Version: UE 4.10
Tags:
more ▼

asked Nov 27 '15 at 11:26 AM in Bug Reports

avatar image

olee92
21 1 4

avatar image Doug E ♦♦ STAFF Dec 01 '15 at 10:27 PM

Hey olee92-

I created a class based on NavArea and had no issues with compiling / hot reloading the code. Could you explain exactly what the issue is that you were running into and the steps to reproduce it so I can test on my end?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi olee92,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

more ▼

answered Dec 07 '15 at 06:15 PM

avatar image tanis2000 Feb 02 '17 at 10:25 PM

It looks like it's still happening with 4.14.3 but only once in a while. It's not happening at every hot reload. I'm having a hard time figuring out why it's happening, though.

avatar image Doug E ♦♦ STAFF Feb 03 '17 at 07:27 PM

Hey tanis2000-

Can you provide specific information about your case? Are you seeing the same "FRecastTileGenerator" error that olee92 reported? If so, can you provide setup/reproduction steps to help me reproduce the behavior locally?

avatar image tanis2000 Feb 03 '17 at 09:58 PM

Yes, the error is exactly the same. The real problem is that this behavior is happening from time to time and I can't reproduce it systematically. It just happens from time to time after I recompile my C++ code.

You can use this project as a test: https://github.com/MieszkoZ/AITutorialCPP.git Just add some brush meshes and nav link proxies to a scene and set those nav link proxies to be NavArea_Jump.

Change a line of code somewhere and recompile from within the editor, run it in simulation, rinse and repeat a couple of times and it should happen to you as well.

avatar image Doug E ♦♦ STAFF Feb 07 '17 at 07:54 PM

I downloaded the project you linked and tried adding Nav Link Proxy, Basic Cubes, and Boxes to the level. and did not see any message about FRecastTileGenerator on hot reload. When you say "set those nav link proxies to NavArea_Jump", can you explain what you're referring to? I was able to find Simple Link->AreaClass, Smart Link->EnabledAreaClass & DisabledAreaClass, and Obstacle->ObstacleAreaClass. Each of these can be set to NavAra_Jump. Please elaborate on the exact settings you're using/changing once you've downloaded/opened the project.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question