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"

Class name written in Eastern characters


I tried to use my own version of a navigation system by setting it up in a custom world settings file.

 UNavigationSystem* NavigationSystemToSend = Cast< UNavigationSystem >(NavigationSystemClass);

 if (NavigationSystemClass != NULL)
     //GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, NavigationSystemToSend->GetClass()->GetName());

But when I try to get the name of the class of my navigation system through AddOnScreenDebugMessage, to check if the correct one is use, the name is written in what appears to be asian characters.

Am I doing something wrong? I mean, I obviously must be, but how can i get the name of the class of my navigation system?

alt text

Product Version: UE 4.12
more ▼

asked Jul 07 '16 at 01:57 PM in C++ Programming

avatar image

62 6 6 10

avatar image Doug E ♦♦ STAFF Jul 07 '16 at 04:10 PM

Hey Rumpelstilskin-

Can you explain your setup after creating the custom WorldSettings class? Is the code provided from the WorldSettings.cpp or is this being added elsewhere in your code? Please provide detailed setup steps to help me investigate this issue on my end.

avatar image Rumpelstilskin Jul 08 '16 at 09:47 PM

Hello Doug-

Sorry for my delayed answer! I tried to write it down, thought it would be easier....

alt text

Hope it's enough and will gladly provide additional informations if needed...

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

1 answer: sort voted first

I'm surprised your code is even working! Assuming NavigationSystemClass is truly a UClass*, then you shouldn't be casting it to a UNavigationSystem *. Instead, try NavigationSystemClass->GetFName(). If NavigationSystemClass is an instance of your custom class, use NavigationSystemClass->GetClass()->GetFName()

more ▼

answered Jul 08 '16 at 03:37 PM

avatar image

Digi Labs Dan
561 16 10 34

avatar image Rumpelstilskin Jul 08 '16 at 10:03 PM

Thanks a lot, I can now see the name of my NavigationSystem Class, I believe. But apparently, I couldn't get Unreal to use my NavSystem...

avatar image Digi Labs Dan Jul 09 '16 at 05:47 AM

Your world should automatically instantiate your subclass of NavigationSystem when play begins (see UNavigationSystem::InitializeForWorld, and set a breakpoint there if you want to attach a debugger and watch it happen). To get the active navigation system instance, you can call World::GetNavigationSystem().

Putting it all together, once play has begun: GetWorld() -> GetNavigationSystem() -> GetClass() -> GetFName().

avatar image Rumpelstilskin Jul 10 '16 at 01:33 AM

I still can't get it to work...

My NavigationSystemClass is not instantiated, SetNavigationSystem() doesn't do anything, probably because I don't know where to call it from to be used properly...

And I tried rewriting InitializeForWorld(), but if my NavigationSysClass is not instantiated, I don't see how it can be called.

avatar image Rumpelstilskin Jul 10 '16 at 03:45 AM

Ok, I just managed to instantiate my NavigationSystem Class in the dirtiest, meanest way possible: Used

GEngine->NavigationSystemClass = NavigationSystemClass;

in the PostInitializeComponents() of my RSysWorldSettings. Can't wait for it to completely crash on me, but it works for now. So I guess problem solved for now. Thanks for your help guys!

(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