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"

How to subclass and then use UGameEngine?

Hey guys,

So joeGraf suggested in my thread here that I subclass the game engine and then tell UE4 to load my version instead. I tried this, in my DefaultEngine.ini, where my project is called FlightPrototype;


I also tried the above without the 'U' at the front of the class name. This was with my UFlightGameEngine class inheriting from UGameEngine.

Any ideas?


Product Version: Not Selected
more ▼

asked Aug 26 '14 at 02:03 PM in C++ Programming

avatar image

453 41 47 72

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

2 answers: sort voted first

Finally figured this out! In a project titled 'NetworkingDemo', with a UGameEngine subclass 'UNetworkedGameEngine', I added the following to my DefaultEngine.ini file:



It seems that you need to drop the preceeding 'U' from the class name. You can see this + other options for setting default classes in the BaseEngine.ini file in your Engine/Config/ folder.

more ▼

answered Jul 26 '15 at 11:40 AM

avatar image

453 41 47 72

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

Compile Error?

What is the compile error?

Make sure you are using

include "Engine.h"

instead of #include "EngineMinimal.h"

in YourGame.h


more ▼

answered Aug 26 '14 at 02:13 PM

avatar image

10.6k 446 345 1088

avatar image HateDread Aug 27 '14 at 05:07 AM

No compile error. It just doesn't use my version of UGameEngine in my game. Think it's something in the .ini. My module name is the same as my project name, right?

avatar image MJ_01 Jan 24 '15 at 05:46 AM

Did you ever get this working? I would like a solution.

avatar image overseb Apr 10 '15 at 09:29 AM


I am very interested by this feature too

Di you mange to make it work ?

avatar image Gam3r May 19 '15 at 02:27 PM

Did anyone figure out how to subclass and make it work?

avatar image theonecalledtom Aug 06 '15 at 05:39 PM

Not working for me either. The class compiles and the engine knows about it because it creates one when I fire up the editor but the game doesn't seem to use it.

avatar image theonecalledtom Aug 06 '15 at 05:45 PM

Well - looks like that's standalone only and there is a different approach for playing from editor. I'll add my voice to the "kinda annoying would be nice to have a single approach to this in both" list, but going to try this now.

avatar image theonecalledtom Aug 06 '15 at 06:11 PM

This doesn't work quite the same - Init and PreExit are called with regards to the lifetime of the editor rather than the game. It does look like there are callbacks that give you equivalent functionality though (look for PlayInEditor).

The one caveat to get it to compile was to add #include "UnrealEd.h" in my .h file.

(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