Monthly archives: December, 2015

Casting types in Unreal Engine

Casting means that you can convert a type to another type. For example, you can convert a given Actor to……

Understanding Pointers in C++

If you want to code games in Unreal Engine 4 in C++, in order to get a firm grip and be fluent you must make use of pointers. Usually, newcomers in C++ are afraid of pointers because they think that they have no actual functionality and are hard to master. Well, truth is that pointers……

Structs Explanation

A structs is a custom variable which you can create. Think of structs as containers, which are constituted by different data types.

Creating a Struct

In order to add a struct, from the class wizard check the “Show all Classes” and select the class Object (I named my stuct PlayerStats in this case). When visual studio pops up,……

Static Keyword Explanation

The static keyword meaning can differ between functions and variables:

A static function in a class means that you don’t need to create an actual instance of a class to access a specific function which is marked as static
A static variable inside a class means tha exactly same thing. However, sometimes you can declare a static……

Tick Function Explanation

The Tick function is called every frame. That is essential as you should not have too many calculations going in that function because you could easily crash your game and that is not a very pleasant experience to the end user.

Using the Tick function

In order to grasp how many times the Tick function is actually……

EndPlay Function Explanation

Some times you want some custom functionality happen in an Actor when you exit your game. Unreal Engine provides a built-in function which is fired when yout exit your game.

Calling the EndPlay Function

In order to call the EndPlay function from an object you first need to override it. To do that, go to……

BeginPlay and GLog Explanation

While developing, you should have a way to output messages so you can check what’s happening in your game. Unreal Engine provides different ways to do that, so you can choose what is best for your needs. In this tutorial you are going to see the GLog function.

Enabling the Output Log in UE Editor

The message that I’m going……

Understanding the Blueprint Function Library

Sometimes, we want to create functions which are going to do useful stuff and we don’t care which blueprints can call them. We want these functions to be included in every blueprint in our project. Unreal Engine provides a very easy way to create such functions. Let’s see how we can create them!

Creating such functions


Calling Blueprint Functions from C++

In this tutorial, I’m going to show you how you can call functions (which are implemented in blueprints) in your C++ code. The steps required are the following:

Declare the corresponding function in C++
Implement the function in the Blueprint graph
Call the overrided function

Let’s start!

Declaring the Blueprint Function

The functions I am going to create is going to accept as……

Exposing C++ functions to Blueprints

In this tutorial I’m going to show you how you can expose a C++ function to Blueprints. As you will see, the workflow is almost identical in the one I used for variable exposing. Let’s start!

Exposing a C++ function using the corresponding Macro

In order to expose a function to Blueprints, I created a class named MyActor and……