Skip to content

Writing your own extension

Nako Sung edited this page Jun 7, 2016 · 4 revisions

Unreal.js doesn't require any meta data to expose into Javascript because UnrealEngine has already enough information of UCLASS, UPROPERTY and UFUNCTION. So if you want some functions to be used within *.js, you may declare a UBlueprintFunctionLibrary. This doesn't require the whole engine to be rebuilt.

class UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
  GENERATED_BODY()
public:
  static void ReallyNiceFunction(ASomeSneakyActor* Actor, int Parameter);
];
let actor = new ASomeSneakyActor(GWorld)
UMyBlueprintFunctionLibrary.ReallyNiceFunction(actor, 1)
actor.ReallyNiceFunction(1)

Boring window extension

A serious example

Clone this wiki locally
You can’t perform that action at this time.