Blog Archives

[TIP] Creating your custom definitions for your UE4 games


Some developers might require their game to be different based on specific builds. For example you make a game and you want to release a demo but don’t want to include certain features. This is actually very easy to achieve. Like literally…very easy. ๐Ÿ™‚

Open your MyProject.Build.cs file and modify it like this:

/* True if this should compile as a demo build */
const bool bIsDemoBuildย = true;

/* Add a new definition called IS_DEMO_BUILD. This will be 1 (true) if bIsDemoBuild is true. Else it will be false (0) */
Definitions.Add(string.Format(“IS_DEMO_BUILD={0}”, (bIsDemoBuild ? “1” : “0”)));

Close your project solution file, right click on your *.uproject file and select Generate Visual Studio project files.

Generate Visual Studio project files.

That’s it! In your header/source files you can now use like this:

#if IS_DEMO_BUILD
UE_LOG(LogTemp, Log, TEXT(“This is a demo build”))
#else
UE_LOG(LogTemp, Log, TEXT(“This is releaseย build”))
#endif

The good thing about this approach is its not just a simple if else condition. The compiler is actually removing the entire code inside that macro based on the condition. ๐Ÿ™‚

[TIP] Make Logging easier in Unreal Engine 4


In this quick tip video, we will see how to create a header file that contains macros which makes logging easier and useful. You can then include this header file in other classes and access the log macro. Finally in Editor, we will use Session Frontend to filter our logs. ๐Ÿ™‚

Hope you liked this video. ๐Ÿ™‚

New feature: QuickLoad


So i’ve been working on v3.1 of Unreal X-Editor and i wanted to share this feature called QuickLoad that will be available in version 3.1. When you press (Ctrl or Shift or Alt) + Q a new text field will appear where your mouse is. Here you have to type your script name and it will instantly show the results with script file location. Here is a screenshot:

QuickLoad feature

%d bloggers like this: