跳到主要内容

Requirements

  • Razer Synapse 4 and Razer Chroma are prerequisites for this setup. The latest version can also be downloaded from this link Check the Chroma option during setup. After the setup is finished sign in with your Razer Id or create one to get started (or log in as a Guest). If a reboot is required, restart your PC.
  • WYVRN runtime for Unreal Engine WYVRN built-in plugin - Get the WYVRN runtime from this link
  • Chroma Emulator - Display Chroma animations without needing Chroma hardware. The documentation for the Chroma Emulator can be found here
  • Synesthesia Console - The console version of the Synesthesia app which displays the WYVRN events received from the Unreal project or game build. Link

WYVRN SDK in Unreal Engine (Built-in)

These instructions are for participants in the Epic Megajam 2025 (2025-10-16 to 2025-11-27).

The WYVRN SDK is part of the Unreal Engine which can be used to control Chroma and haptics.

Getting Started

To get started open Unreal Engine.

image_1

Create a new project or open an existing project. Both Blueprints and C++ are supported.

image_2

Use the Edit menu and select the Plugins menu item.

image_3

Search chroma to select the Razer Chroma Devices plugin.

image_4

Activate the plugin and click Yes if asked to accept the beta plugin. image_5

Click Restart Now to relaunch the Unreal Engine with the plugin enabled.

image_6

The plugin is now enabled.

image_7

Use the Edit menu and select the Project Settings menu item.

image_8

Scroll down to the Plugins section and select the Razer Chroma Settings project settings.

image_9

Check Create Razer Chroma Input Device and expand App Info to update the details for Application Title, Application Description, Author Name, and Author Contact

image_10

The App Info specifies details that appear in the CHROMA APPS list.

image_11

Open the level blueprint.

image_12

Create a Set Event Name node which is used to trigger Chroma and haptics events by name.

image_13

Name any of your game events and pass the name to Set Event Name.

image_14

This causes the external command to trigger.

Demo_Development_Editor: play NameAnyGameEvent

Save the level to save the blueprint changes. image_15

The WYVRN Effects Library provides a set of existing event names to choose from.

image_17

Use SynesthesiaServer.exe from the WyvrnOfficial Github repository to verify event names are being sent properly by the game events.

The public repository can be downloaded or cloned to get access to the tools.

git clone https://github.com/WyvrnOfficial/RazerSensa_DevKit

Use Apps/Synesthesia/ReleaseConsole/SynesthesiaServer.exe in order to view game events sent by SetEventName.

Use the Chroma Emulator in order to view the Chroma animations.

image_16

C++ Project

The Razer Chroma Devices plugin can be used from Blueprints and C++. Some build setup is needed to use the plugin from C++.

Unreal_CppBlueprints

RazerChromaDevices Module

In order to use the Unreal built-in plugin from C++ add the RazerChromaDevices to your project C# build script at MyProjectRoot/Source/MyProject/MyProject.Build.cs. Add the RazerChromaDevices to the PublicDependencyModuleNames array.

// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class MyProject : ModuleRules
{
public MyProject(ReadOnlyTargetRules Target) : base(Target)
{
// ...

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "RazerChromaDevices" });

// ...
}
}

C++ Code

One way to use the RazerChromaDevices module from C++ is by wrapping it with a Blueprint library. Use the Tools menu and select the New C++ Class... menu item.

Unreal_ToolsNewClass

In the dialog select Blueprint Function Library and click Next.

Unreal_AddBlueprintLibrary

The Class Type can be Private with the scope only needs to be accessed from the game. The Name can be MyBlueprintFunctionLibrary as an example. And click Create Class.

Unreal_NewFunctionLibrary

The SampleMyEvent blueprint function can be added to the MyBlueprintFunctionLibrary.h header.

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
*
*/
UCLASS()
class UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()


UFUNCTION(BlueprintCallable, meta = (DisplayName = "MyEvent", Keywords = "A game event"), Category = "Sample")
static void SampleMyEvent();

};

Add the RazerChromaFunctionLibrary.h include to the MyBlueprintFunctionLibrary.cpp implementation to be be used from the SampleMyEvent body.

// Fill out your copyright notice in the Description page of Project Settings.


#include "MyBlueprintFunctionLibrary.h"
#include "RazerChromaFunctionLibrary.h"


void UMyBlueprintFunctionLibrary::SampleMyEvent()
{
#if PLATFORM_WINDOWS
URazerChromaFunctionLibrary::SetEventName("@Idle_Purple");
#endif
}

The SetEventName call can be automatically copied from the WYVRN Effects Library just select the language as Unreal (C++ Experimental Built-in Plugin). Click the Copy button on the desired effect which adds the code snippet to the clipboard.

Unreal_CopyOptions

At this point the SampleMyEvent blueprint function can be called. The @Idle_Purple effect will play when the level starts with the event connected to Event BeginPlay. The Chroma Emulator will display the effect on screen.

Unreal_BlueprintNode