Unreal Engine 4 Genvid Blueprint¶
Preparing your game¶
To simplify the Genvid SDK integration into your Unreal project, you
can now create a Blueprint class directly from the editor. The
Blueprint parent class needs to be derived from
UGenvidStreamer
.
Once you have created your Blueprint asset, you can start by placing
the Blueprint events needed for your project into the Unreal Editor.
In the all Actions for this Blueprint contextual menu, type
Add event Genvid
to see the events available from the Genvid
SDK.
Note
The event BeginPlay()
is mandatory
because you need to call the Startup()
function to load the Genvid module and create your streams, events,
and commands. All the other events are there to simplify the
integration with your game. You will also probably need to use at
least one of the available callbacks if you want some interactions.
After placing all events and callbacks your project needs, you should have a skeleton which looks like the following image.
At this point, the skeleton is done. You can now set up the streams you want to manage in the Blueprint.
As you can see in the animation just below, you can add your own
Stream/Event/Command IDs. Make sure to set the streaming tick
interval
variable to a different value if you don’t want to be in sync
with the frame rate.
Now you’re ready to manage your Streams, Events, and Commands. Start by creating a function for each Event and Callback accessible from Blueprint. Below is an example of what it should look like.
In BeginPlay()
you can now call the
Startup()
function to create your Streams
and subscribe to your Events and Commands.
At this point you’re ready to send GameDatas, Annotations, and
Notifications. Take a look at the BP_GenvidConnector.uasset
used in the UnrealTournament demo to see an advanced example of
Blueprint with Genvid.