Time for action – bringing your Flash asset into CryENGINE 3
Let's follow a few simple steps:
The first thing we need is an XML file for the newly created Flash asset. Go to the
<engine root>\Game\Libs\UI\UIElements\
folder, and create a new XML file (for exampleNewHUD.xml
).The layout of the XML file is pretty easy. Each XML can have multiple Flash assets defined. It starts with a
<UIElements>
tag and ends with a</UIElements>
tag. Within this tag, you can define your UIElements. Add a new<UIElement>
definition for your new HUD:<UIElements name="HUD"> <UIElement name="NewHUD" render_lockless="1"> <GFx file="NewHUD.swf" layer="1"> <Constraints><Align mode="dynamic" valign="center" halign="center"scale="1" max="0" /> </Constraints> </GFx> </UIElement> </UIElements>
This is the basic layout for a new UIElement with the name
NewHUD
. Within the<GFx>
tag you need to define the actual SWF file...