Getting Used To Unreal4

Hi all,

I’m a student with a background in Unity development, trying to get used to Unreal 4. I have no desire to use blueprints, so this question is regarding C++ programming.

I’m having some trouble with the fact that Unreal seems to do a lot of things automatically. Currently, I have a very simple scene, composed of a floor, a directional light and a skydome. Coming from Unity, I would expect to see a black screen when hitting ‘Play’. In Unreal, however, hitting Play causes all kinds of things to be instantiated in the scene. PlayerController, CameraActor, DefaultPawn, GameNetworkManager, GameSession, PlayerState, etc. Suddenly, I have a camera, along with WASD and mouse controls, none of which I implemented. This leaves me rather confused, and feeling out of control. Also, the game I am making doesn’t actually need a player character (I believe this would be the Pawn), as it is something like an RTS, where the player controls units from a top-down camera perspective.

I have the feeling that, in order to take control over these things, I need to be overriding certain classes, but I can’t seem to find out which ones. I succesfully derived from the GameMode class and implemented the StartPlay() function, and set my GameMode class as the default game mode to be loaded. All the options under ‘Selected GameMode’ (in Project Settings-> Maps & Modes…), however, are greyed out.

Am I missing something fundamental here? How can I take full manual control over what my camera is doing, as well as disable the automatic Pawn spawning?

Any help would be much appreciated :slight_smile:

Hello Escaran,

Yes UE4 is a bit of a roller coster to get used to and yes a LOT of things happen automatically that can seem confusing at first but once you learn what is going on there is not anything you do not have control of. If you are using C++ I suggest you also look at the C++ tutorial so that you get a basic understanding of how things work https://docs.unrealengine.com/latest/INT/Videos/index.html?category=Programming. Not using blueprints? The Hybridization of Blueprints and C++ will make you much more efficient I suggest you at least learn the basics. If you are making an RTS I suggest you first take a look at the UE4 RTS template. You can find it in the market (I believe it is free).

Okay by default UE4 utilizes a set of base classes with some default behavior. These base classes you will need to customize will be primarily APlayerController and ACharacter (or APawn the parent of ACharacter).

Now why is your Game Mode Settings greyed out? This took me some time to figure out as well. When you select a GameMode that is hard coded in C++ you are unable to change the Default Object Types (such as PlayerController, Character, and HUD) because they “should” be set in code. if you want to edit these properties you need to Create a blueprint from your hardcoded C++ GameMode, and that will allow you to change the Default Types in the editor.

Hope this helps