Casting means that you can convert a type to another type. For example, you can convert a given Actor to……
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……
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,……
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……
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……
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……
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……
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
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
Declaring the Blueprint Function
The functions I am going to create is going to accept as……
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……
Support my tutorialsSupport my UE4 tutorials by donating an amount of your choice!
- November 29, 2018
- November 7, 2018
- November 5, 2018
- Unreal Engine 4
- Publications, Unreal Engine 4
- Publications, Unreal Engine 4