Coherent UI for CryEngine 3.4.5 (build 6666) Free SDK
Visit our blog for a review of the plugin and code walkthrough.
NOTE: build instructions in the blog post may be outdated, we changed the directory structure; Use the build instructions in this file.
Use the installer or extract the files to your CryEngine SDK Folder so that the Code and BinXX/Plugins directories match up.
The plugin manager will automatically load up the plugin when the game/editor is restarted or if you directly load it.
NOTE: We'll refer to the root CryEngine3 folder as <CE3> and the <CE3>/Code folder as <Code>.
- Checkout the CoherentUI Plugin (this repository) in the
<Code>directory. - Checkout Plugin_SDK in the
<Code>directory. - Checkout Plugin_D3D in the
<Code>directory.
You should have the following folder structure now:
<Code>/CoherentUI_CryEngine3
<Code>/Plugin_D3D
<Code>/Plugin_SDK - Get Coherent UI from http://coherent-labs.com/UIDownload/.
- Extract the archive in
<Code>/CoherentUI_CryEngine3/CoherentUI - Run
<Code>/CoherentUI_CryEngine3/CoherentUI/bootstrap_win32.bat - (Optional) Run
<Code>/CoherentUI_CryEngine3/CoherentUI/bootstrap_win64.batif you intend to build 64-bit binaries
- Build the plugins
- Build
<Code>/Plugin_SDK/project/Plugin SDK.sln(it is important to build this first since it generates a include file used by the other projects) - Build
<Code>/Plugin_D3D/project/D3D.sln - Build
<Code>/CoherentUI_CryEngine3/project/CoherentUI.sln
- Copy the
<Code>/CoherentUI_CryEngine3/CoherentUI/lib/Win32/hostdirectory into<CE3>/Bin32/Plugins/CoherentUI(after the copy there should be a directory named host in the CoherentUI folder). - Copy the files in
<Code>/CoherentUI_CryEngine3/CoherentUI/lib/Win32(without the host) into<CE3>/Bin32. You should have CoherentUI.dll in the<CE3>/Bin32/folder now.
- (Optional) If you're building 64-bit binaries:
- copy
<Code>/CoherentUI_CryEngine3/CoherentUI/lib/Win64/hostdirectory into<CE3>/Bin64/Plugins/CoherentUI - copy the files in
<Code>/CoherentUI_CryEngine3/CoherentUI/lib/Win64(without the host) into<CE3>/Bin64.
- copy
- Copy the contents of the
<Code>/CoherentUI_CryEngine3/samplesfolder into<CE3>, overwriting files when asked - Build the Game DLL using
<Code>/Solutions/CryEngine_GameCodeOnly.sln.
NOTE: The prebuilt versions are targeted for Coherent UI 1.2.1.1 ProTrial
There are prebuilt binaries in the <Code>/CoherentUI_CryEngine3/Prebuilt folder. To use them, just copy them over to the appropriate directory of <CE3> (i.e. Bin32 or Bin64).
You should also copy the contents of the <Code>/CoherentUI_CryEngine3/samples folder into <CE3>, overwriting files when asked.
There is a sample flow graph in <Code>/CoherentUI_CryEngine3/samples/Game/Levels/Singleplayer/ForestCOUI/CoUIFlowNodes.xml.
The easiest way to use it is to open the sandbox (editor), load the provided ForestCOUI level and import the flow graph into an entity.
As an example, we'll import the sample into CoherentBreakableEntity's flow. Select the CoherentBreakableEntity entity and click on "Create" in the Flow Graph section of the rollup bar.
From the Flow Graph window, select File -> Import... and import CoUIFlowNodes.xml. Exit the Flow Graph window, save the level and export it to the engine (Ctrl+E). Now the flow graph will be used in the Launcher, too.
prefix_samplecvarTODO: Describe the cvar
Renders a Coherent UI View on an entity
Inputs
ActivateActivate the nodeUrlInitial url to display on the viewWidthWidth of the view in pixelsHeightHeight of the view in pixelsTransparentDefines if the view should be transparent or notClickableDefines if the view should support click-through queriesMeshGeometry object for calculating correct click coordinates on the entitySharedMemoryDefines if the view uses shared memory for the rendering data transport or shared textures
Outputs
ViewIDId of the view for further use (e.g. for the TriggerEvent node)
Renders a Coherent UI View on the HUD
Inputs
ActivateActivate the nodePathPath to the html files defining the HUD (e.g. coui://Libs/UI/CoherentUI/hud/hud.html)
Outputs
ViewIDId of the view for further use (e.g. for the TriggerEvent node)
Handles an event from a Coherent UI View with an optional string and boolean parameter
Inputs
ActivateActivate the nodeViewIDId of the view as obtained from one of the output nodesEventThe event name
Outputs
Arg1String argument received from the view (optional)Arg2Boolean argument received from the view (optional)
Triggers an event on a Coherent UI View with an optional boolean parameter
Inputs
ActivateActivate the nodeViewIDId of the view as obtained from one of the output nodesEventThe event nameArg1Boolean argument to be send to the view (optional)
Triggers an event on a Coherent UI View with up to four float parameter
Inputs
ActivateActivate the nodeViewIDId of the view as obtained from one of the output nodesEventThe event nameArg1First float argument to be send to the view (optional)Arg2Second float argument to be send to the view (optional)Arg3Third float argument to be send to the view (optional)Arg4Fourth float argument to be send to the view (optional)
Triggers an event on a Coherent UI View that receives the JSON encoded game tokens
Inputs
ActivateActivate the nodeViewIDId of the view as obtained from one of the output nodesEventThe event name (default: GameTokens)
Switch input between player and Coherent UI. When enabled, all input is sent to Coherent UI and the mouse cursor is displayed.
Inputs
ActivateActivate the nodeEnabledBoolean argument. True enables input to Coherent UI, false disables it
TODO: Describe custom object classes inside your plugin
...