Wednesday, April 16, 2014

Extending the UE4 Editor

For mockup, use the experimental "Blutility"
https://forums.unrealengine.com/showthread.php?1954-Tutorial-Blutility-Running-Blueprint-functions-inside-Editor

Blutility is also said to possess a pointer to UEditorEngine so we can place actors and in the editor in a procedural way.
https://answers.unrealengine.com/questions/22052/how-can-i-place-actors-in-a-level-using-code-or-bp.html

The hard (and more powerful) way of extending the editor:
https://answers.unrealengine.com/questions/25609/customizing-the-editors-toolbar-buttons-menu-via-c.html?sort=oldest

update 1 ----------

Easier method to access GEditor is to #include "UnrealEd.h"
Also add "UnrealEd" in [yourproject].Build.cs as a PrivateDependencyModule
i.e.,   PrivateDependencyModuleNames.AddRange(new string[] {"UnrealEd"});

update 2 ----------

Landscape actor (ALandscape) can be spawned in the editor as in LandscapeEditorDetailCustomization_NewLandscape.cpp without the need to reference GEditor at all.

Monday, April 14, 2014

UE4 package slowly on Mac OS X?

UE4.0.2 on Mac package its demo very slowly. It took too much time to compress all the textures. It took me a ridiculous amount of time to package so small a game to iOS.

This is probably because my UE4Editor is in debug mode. Getting it to run in development mode is not so obvious for Mac. After a dig, here is the instruction:
https://answers.unrealengine.com/questions/25997/couple-questions-on-mac-side-of-things.html

Compiling UE4 source folder on a Mac Partition with Visual Studio?

It makes sense to use the same unreal engine folder for win and Mac. However, the problem is that Mac & windows don't use the same partition type. MacDrive seems to be a solution at first as it help in transparently accessing files on mac partition from windows. However, compiling hundred thousands of files on windows is a very slow process and can be much slower with MacDrive.

As a result... I use two sets of code on the same HD, one for mac and the other for win.

Sunday, April 13, 2014

UE4 performs better on windows

UE4 runs so slow on OS X : Mac book PRO w/ NVIDIA GTX750M.
It performs better on Windows 8.1 than on OS X.
Hope this problem will be fixed soon.

A lead to UE4 landscape automation.

Ok, this is my quick notes for UE4 as a blog.
Currently, i'm working on stuff related to automatic terrain generation. When dealing with large amount of data, something like manually clicking editor import to create each landscape is not an option.
To automate this:
The first lead is inside: LandscapeEditorDetailCustomization_NewLandscape.cpp
FLandscapeEditorDetailCustomization_NewLandscape::OnCreateButtonClicked()
This little method will show how we can spawn a landscape out of nowhere, creating a landscape from a raw data. Cool, so now we can procedurally generate landscapes here in the editor.