Skip to content

razerofficial/UnityNativeChromaSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

  • Note: Visit the Chroma Animation Guide to find the latest supported plugin for Chroma RGB.

  • Note: This version of the Unity plugin is deprecated.

  • Note: Go to Unity_SampleApp for the latest Unity plugin.

UnityNativeChromaSDK - Unity native library for the ChromaSDK

Table of Contents

See Also

Docs:

Plugins:

  • CChromaEditor - C++ native MFC library for playing and editing Chroma animations

Quick Start

  • Install Synapse

  • Make sure the Chroma Connect module is installed.

image_7

Frameworks supported

  • Unity 3.5.7 or later
  • Windows Editor / Windows Standalone

Prerequisites

Dependencies

  • CChromaEditor - C++ Native MFC Library for playing and editing Chroma animations

Packaging

Import UnityNativeChromaSDK.unitypackage into your project.

Getting Started

1 Install Synapse

2 (Optional) Install the Emulator

3 Connect Razer Chroma hardware

4 Install Unity3d

5 Open Unity and start with an existing project or open a new project

6 Backup your project in source control!

7 Import UnityNativeChromaSDK.unitypackage into your project.

Import Unity Package

8 Create Chroma animations from the Assets/ChromaSDK/Create Chroma Animation menu item. This will open a file save dialog and create a chroma animation file when saved.

9 Edit Chroma animations by selecting a Chroma animation in the Object Hierarchy and select the Assets/ChromaSDK/Edit Chroma Animation menu item.

image_1

10 Also edit Chroma animations by selecting a .chroma file in the Object Hierarchy, right-click, and select the ChromaSDK/Edit Chroma Animation context item.

image_6

Tutorials

Convert Video to Chroma Animation

  • Step 1: Capture video with a tool like Camtasia and export the video as a GIF image sequence.

  • Step 2: Convert the GIF to a PNG image sequence. I use the online tool onlineconverter.com to convert the GIF to an image sequence.

  • Step 3: Use the Chroma Material Window to play the image sequence on a material.

  • Step 4: Capture the material on a plane with the Unity Capture tool.

Razer Chroma Playlist

Capture Window

Composite Capture

Composite Playback

Capture With Images

Keyboard Layout Toggle

Loop and Reverse

Keyboard Masks

Layouts and Playback Looping

Assets

Chroma animations are loaded from the StreamingAssets folder.

Use the GameObject->ChromaSDK menu to create Chroma animations.

image_1

Chroma animations should be saved in the StreamingAssets folder.

Editing Chroma animations will open the Chroma editor dialog.

image_2

API


AddFrame

Adds a frame to the Chroma animation and sets the duration (in seconds). The color is expected to be an array of the dimensions for the deviceType/device. The length parameter is the size of the color array. For EChromaSDKDevice1DEnum the array size should be MAX LEDS. For EChromaSDKDevice2DEnum the array size should be MAX ROW * MAX COLUMN. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.AddFrame(int animationId, float duration, int[] colors, int length);

AddNonZeroAllKeysAllFrames

Add source color to target where color is not black for all frames, reference source and target by id.

UnityNativeChromaSDK.AddNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

AddNonZeroAllKeysAllFramesName

Add source color to target where color is not black for all frames, reference source and target by name.

UnityNativeChromaSDK.AddNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

AddNonZeroAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AddNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

AddNonZeroAllKeysAllFramesOffset

Add source color to target where color is not black for all frames starting at offset for the length of the source, reference source and target by id.

UnityNativeChromaSDK.AddNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

AddNonZeroAllKeysAllFramesOffsetName

Add source color to target where color is not black for all frames starting at offset for the length of the source, reference source and target by name.

UnityNativeChromaSDK.AddNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

AddNonZeroAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AddNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

AddNonZeroAllKeysOffset

Add source color to target where color is not black for the source frame and target offset frame, reference source and target by id.

UnityNativeChromaSDK.AddNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset);

AddNonZeroAllKeysOffsetName

Add source color to target where color is not black for the source frame and target offset frame, reference source and target by name.

UnityNativeChromaSDK.AddNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset);

AddNonZeroAllKeysOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AddNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset);

AddNonZeroTargetAllKeysAllFrames

Add source color to target where the target color is not black for all frames, reference source and target by id.

UnityNativeChromaSDK.AddNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

AddNonZeroTargetAllKeysAllFramesName

Add source color to target where the target color is not black for all frames, reference source and target by name.

UnityNativeChromaSDK.AddNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

AddNonZeroTargetAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AddNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

AddNonZeroTargetAllKeysAllFramesOffset

Add source color to target where the target color is not black for all frames starting at offset for the length of the source, reference source and target by id.

UnityNativeChromaSDK.AddNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

AddNonZeroTargetAllKeysAllFramesOffsetName

Add source color to target where the target color is not black for all frames starting at offset for the length of the source, reference source and target by name.

UnityNativeChromaSDK.AddNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

AddNonZeroTargetAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AddNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

AddNonZeroTargetAllKeysOffset

Add source color to target where target color is not blank from the source frame to the target offset frame, reference source and target by id.

UnityNativeChromaSDK.AddNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset);

AddNonZeroTargetAllKeysOffsetName

Add source color to target where target color is not blank from the source frame to the target offset frame, reference source and target by name.

UnityNativeChromaSDK.AddNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset);

AddNonZeroTargetAllKeysOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AddNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset);

AppendAllFrames

Append all source frames to the target animation, reference source and target by id.

UnityNativeChromaSDK.AppendAllFrames(int sourceAnimationId, int targetAnimationId);

AppendAllFramesName

Append all source frames to the target animation, reference source and target by name.

UnityNativeChromaSDK.AppendAllFramesName(string sourceAnimation, string targetAnimation);

AppendAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.AppendAllFramesNameD(string sourceAnimation, string targetAnimation);

ClearAll

PluginClearAll will issue a CLEAR effect for all devices.

UnityNativeChromaSDK.ClearAll();

ClearAnimationType

PluginClearAnimationType will issue a CLEAR effect for the given device.

UnityNativeChromaSDK.ClearAnimationType(int deviceType, int device);

CloseAll

PluginCloseAll closes all open animations so they can be reloaded from disk. The set of animations will be stopped if playing.

UnityNativeChromaSDK.CloseAll();

CloseAnimation

Closes the Chroma animation to free up resources referenced by id. Returns the animation id upon success. Returns -1 upon failure. This might be used while authoring effects if there was a change necessitating re-opening the animation. The animation id can no longer be used once closed.

int result = UnityNativeChromaSDK.CloseAnimation(int animationId);

CloseAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CloseAnimationD(double animationId);

CloseAnimationName

Closes the Chroma animation referenced by name so that the animation can be reloaded from disk.

UnityNativeChromaSDK.CloseAnimationName(string path);

CloseAnimationNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CloseAnimationNameD(string path);

CloseComposite

PluginCloseComposite closes a set of animations so they can be reloaded from disk. The set of animations will be stopped if playing.

UnityNativeChromaSDK.CloseComposite(string name);

CloseCompositeD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CloseCompositeD(string name);

CopyAnimation

Copy animation to named target animation in memory. If target animation exists, close first. Source is referenced by id.

int result = UnityNativeChromaSDK.CopyAnimation(int sourceAnimationId, string targetAnimation);

CopyAnimationName

Copy animation to named target animation in memory. If target animation exists, close first. Source is referenced by name.

UnityNativeChromaSDK.CopyAnimationName(string sourceAnimation, string targetAnimation);

CopyAnimationNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyAnimationNameD(string sourceAnimation, string targetAnimation);

CopyBlueChannelAllFrames

Copy blue channel to other channels for all frames. Intensity range is 0.0 to 1.0. Reference the animation by id.

UnityNativeChromaSDK.CopyBlueChannelAllFrames(int animationId, float redIntensity, float greenIntensity);

CopyBlueChannelAllFramesName

Copy blue channel to other channels for all frames. Intensity range is 0.0 to 1.0. Reference the animation by name.

UnityNativeChromaSDK.CopyBlueChannelAllFramesName(string path, float redIntensity, float greenIntensity);

CopyBlueChannelAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyBlueChannelAllFramesNameD(string path, double redIntensity, double greenIntensity);

CopyGreenChannelAllFrames

Copy green channel to other channels for all frames. Intensity range is 0.0 to 1.0. Reference the animation by id.

UnityNativeChromaSDK.CopyGreenChannelAllFrames(int animationId, float redIntensity, float blueIntensity);

CopyGreenChannelAllFramesName

Copy green channel to other channels for all frames. Intensity range is 0.0 to 1.0. Reference the animation by name.

UnityNativeChromaSDK.CopyGreenChannelAllFramesName(string path, float redIntensity, float blueIntensity);

CopyGreenChannelAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyGreenChannelAllFramesNameD(string path, double redIntensity, double blueIntensity);

CopyKeyColor

Copy animation key color from the source animation to the target animation for the given frame. Reference the source and target by id.

UnityNativeChromaSDK.CopyKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey);

CopyKeyColorAllFrames

Copy animation key color from the source animation to the target animation for all frames. Reference the source and target by id.

UnityNativeChromaSDK.CopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey);

CopyKeyColorAllFramesName

Copy animation key color from the source animation to the target animation for all frames. Reference the source and target by name.

UnityNativeChromaSDK.CopyKeyColorAllFramesName(string sourceAnimation, string targetAnimation, int rzkey);

CopyKeyColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyKeyColorAllFramesNameD(string sourceAnimation, string targetAnimation, double rzkey);

CopyKeyColorAllFramesOffset

Copy animation key color from the source animation to the target animation for all frames, starting at the offset for the length of the source animation. Source and target are referenced by id.

UnityNativeChromaSDK.CopyKeyColorAllFramesOffset(int sourceAnimationId, int targetAnimationId, int rzkey, int offset);

CopyKeyColorAllFramesOffsetName

Copy animation key color from the source animation to the target animation for all frames, starting at the offset for the length of the source animation. Source and target are referenced by name.

UnityNativeChromaSDK.CopyKeyColorAllFramesOffsetName(string sourceAnimation, string targetAnimation, int rzkey, int offset);

CopyKeyColorAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyKeyColorAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double rzkey, double offset);

CopyKeyColorName

Copy animation key color from the source animation to the target animation for the given frame.

UnityNativeChromaSDK.CopyKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey);

CopyKeyColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey);

CopyKeysColor

Copy animation color for a set of keys from the source animation to the target animation for the given frame. Reference the source and target by id.

UnityNativeChromaSDK.CopyKeysColor(int sourceAnimationId, int targetAnimationId, int frameId, int[] keys, int size);

CopyKeysColorName

Copy animation color for a set of keys from the source animation to the target animation for the given frame. Reference the source and target by name.

UnityNativeChromaSDK.CopyKeysColorName(string sourceAnimation, string targetAnimation, int frameId, int[] keys, int size);

CopyKeysColorOffset

Copy animation color for a set of keys from the source animation to the target animation from the source frame to the target frame. Reference the source and target by id.

UnityNativeChromaSDK.CopyKeysColorOffset(int sourceAnimationId, int targetAnimationId, int sourceFrameId, int targetFrameId, int[] keys, int size);

CopyKeysColorOffsetName

Copy animation color for a set of keys from the source animation to the target animation from the source frame to the target frame. Reference the source and target by name.

UnityNativeChromaSDK.CopyKeysColorOffsetName(string sourceAnimation, string targetAnimation, int sourceFrameId, int targetFrameId, int[] keys, int size);

CopyNonZeroAllKeys

Copy source animation to target animation for the given frame. Source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroAllKeys(int sourceAnimationId, int targetAnimationId, int frameId);

CopyNonZeroAllKeysAllFrames

Copy nonzero colors from a source animation to a target animation for all frames. Reference source and target by id.

UnityNativeChromaSDK.CopyNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

CopyNonZeroAllKeysAllFramesName

Copy nonzero colors from a source animation to a target animation for all frames. Reference source and target by name.

UnityNativeChromaSDK.CopyNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

CopyNonZeroAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

CopyNonZeroAllKeysAllFramesOffset

Copy nonzero colors from a source animation to a target animation for all frames starting at the offset for the length of the source animation. The source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

CopyNonZeroAllKeysAllFramesOffsetName

Copy nonzero colors from a source animation to a target animation for all frames starting at the offset for the length of the source animation. The source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

CopyNonZeroAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

CopyNonZeroAllKeysName

Copy nonzero colors from source animation to target animation for the specified frame. Source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroAllKeysName(string sourceAnimation, string targetAnimation, int frameId);

CopyNonZeroAllKeysNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroAllKeysNameD(string sourceAnimation, string targetAnimation, double frameId);

CopyNonZeroAllKeysOffset

Copy nonzero colors from the source animation to the target animation from the source frame to the target offset frame. Source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset);

CopyNonZeroAllKeysOffsetName

Copy nonzero colors from the source animation to the target animation from the source frame to the target offset frame. Source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset);

CopyNonZeroAllKeysOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset);

CopyNonZeroKeyColor

Copy animation key color from the source animation to the target animation for the given frame where color is not zero.

UnityNativeChromaSDK.CopyNonZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey);

CopyNonZeroKeyColorName

Copy animation key color from the source animation to the target animation for the given frame where color is not zero.

UnityNativeChromaSDK.CopyNonZeroKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey);

CopyNonZeroKeyColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey);

CopyNonZeroTargetAllKeys

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for the specified frame. Source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeys(int sourceAnimationId, int targetAnimationId, int frameId);

CopyNonZeroTargetAllKeysAllFrames

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for all frames. Source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

CopyNonZeroTargetAllKeysAllFramesName

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for all frames. Source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

CopyNonZeroTargetAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

CopyNonZeroTargetAllKeysAllFramesOffset

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for all frames. Source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

CopyNonZeroTargetAllKeysAllFramesOffsetName

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for all frames starting at the target offset for the length of the source animation. Source and target animations are referenced by name.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

CopyNonZeroTargetAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

CopyNonZeroTargetAllKeysName

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for the specified frame. The source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysName(string sourceAnimation, string targetAnimation, int frameId);

CopyNonZeroTargetAllKeysNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroTargetAllKeysNameD(string sourceAnimation, string targetAnimation, double frameId);

CopyNonZeroTargetAllKeysOffset

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for the specified source frame and target offset frame. The source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset);

CopyNonZeroTargetAllKeysOffsetName

Copy nonzero colors from the source animation to the target animation where the target color is nonzero for the specified source frame and target offset frame. The source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset);

CopyNonZeroTargetAllKeysOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset);

CopyNonZeroTargetZeroAllKeysAllFrames

Copy nonzero colors from the source animation to the target animation where the target color is zero for all frames. Source and target are referenced by id.

UnityNativeChromaSDK.CopyNonZeroTargetZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

CopyNonZeroTargetZeroAllKeysAllFramesName

Copy nonzero colors from the source animation to the target animation where the target color is zero for all frames. Source and target are referenced by name.

UnityNativeChromaSDK.CopyNonZeroTargetZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

CopyNonZeroTargetZeroAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyNonZeroTargetZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

CopyRedChannelAllFrames

Copy red channel to other channels for all frames. Intensity range is 0.0 to 1.0. Reference the animation by id.

UnityNativeChromaSDK.CopyRedChannelAllFrames(int animationId, float greenIntensity, float blueIntensity);

CopyRedChannelAllFramesName

Copy green channel to other channels for all frames. Intensity range is 0.0 to 1.0. Reference the animation by name.

UnityNativeChromaSDK.CopyRedChannelAllFramesName(string path, float greenIntensity, float blueIntensity);

CopyRedChannelAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyRedChannelAllFramesNameD(string path, double greenIntensity, double blueIntensity);

CopyZeroAllKeysAllFrames

Copy zero colors from source animation to target animation for all frames. Source and target are referenced by id.

UnityNativeChromaSDK.CopyZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

CopyZeroAllKeysAllFramesName

Copy zero colors from source animation to target animation for all frames. Source and target are referenced by name.

UnityNativeChromaSDK.CopyZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

CopyZeroAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

CopyZeroAllKeysAllFramesOffset

Copy zero colors from source animation to target animation for all frames starting at the target offset for the length of the source animation. Source and target are referenced by id.

UnityNativeChromaSDK.CopyZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

CopyZeroAllKeysAllFramesOffsetName

Copy zero colors from source animation to target animation for all frames starting at the target offset for the length of the source animation. Source and target are referenced by name.

UnityNativeChromaSDK.CopyZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

CopyZeroAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

CopyZeroKeyColor

Copy zero key color from source animation to target animation for the specified frame. Source and target are referenced by id.

UnityNativeChromaSDK.CopyZeroKeyColor(int sourceAnimationId, int targetAnimationId, int frameId, int rzkey);

CopyZeroKeyColorName

Copy zero key color from source animation to target animation for the specified frame. Source and target are referenced by name.

UnityNativeChromaSDK.CopyZeroKeyColorName(string sourceAnimation, string targetAnimation, int frameId, int rzkey);

CopyZeroKeyColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyZeroKeyColorNameD(string sourceAnimation, string targetAnimation, double frameId, double rzkey);

CopyZeroTargetAllKeysAllFrames

Copy nonzero color from source animation to target animation where target is zero for all frames. Source and target are referenced by id.

UnityNativeChromaSDK.CopyZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

CopyZeroTargetAllKeysAllFramesName

Copy nonzero color from source animation to target animation where target is zero for all frames. Source and target are referenced by name.

UnityNativeChromaSDK.CopyZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

CopyZeroTargetAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.CopyZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

CoreCreateChromaLinkEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateChromaLinkEffect(int Effect, IntPtr pParam, out Guid pEffectId);

CoreCreateEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateEffect(Guid DeviceId, EFFECT_TYPE Effect, IntPtr pParam, out Guid pEffectId);

CoreCreateHeadsetEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateHeadsetEffect(int Effect, IntPtr pParam, out Guid pEffectId);

CoreCreateKeyboardEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateKeyboardEffect(int Effect, IntPtr pParam, out Guid pEffectId);

CoreCreateKeypadEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateKeypadEffect(int Effect, IntPtr pParam, out Guid pEffectId);

CoreCreateMouseEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateMouseEffect(int Effect, IntPtr pParam, out Guid pEffectId);

CoreCreateMousepadEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreCreateMousepadEffect(int Effect, IntPtr pParam, out Guid pEffectId);

CoreDeleteEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreDeleteEffect(Guid EffectId);

CoreInit

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreInit();

CoreQueryDevice

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreQueryDevice(Guid DeviceId, out DEVICE_INFO_TYPE DeviceInfo);

CoreSetEffect

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreSetEffect(Guid EffectId);

CoreUnInit

Direct access to low level API.

long result = UnityNativeChromaSDK.CoreUnInit();

CreateAnimation

Creates a Chroma animation at the given path. The deviceType parameter uses EChromaSDKDeviceTypeEnum as an integer. The device parameter uses EChromaSDKDevice1DEnum or EChromaSDKDevice2DEnum as an integer, respective to the deviceType. Returns the animation id upon success. Returns -1 upon failure. Saves a Chroma animation file with the .chroma extension at the given path. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.CreateAnimation(string path, int deviceType, int device);

CreateAnimationInMemory

Creates a Chroma animation in memory without creating a file. The deviceType parameter uses EChromaSDKDeviceTypeEnum as an integer. The device parameter uses EChromaSDKDevice1DEnum or EChromaSDKDevice2DEnum as an integer, respective to the deviceType. Returns the animation id upon success. Returns -1 upon failure. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.CreateAnimationInMemory(int deviceType, int device);

CreateEffect

Create a device specific effect.

long result = UnityNativeChromaSDK.CreateEffect(Guid deviceId, EFFECT_TYPE effect, int[] colors, int size, out FChromaSDKGuid effectId);

DeleteEffect

Delete an effect given the effect id.

long result = UnityNativeChromaSDK.DeleteEffect(Guid effectId);

DuplicateFirstFrame

Duplicate the first animation frame so that the animation length matches the frame count. Animation is referenced by id.

UnityNativeChromaSDK.DuplicateFirstFrame(int animationId, int frameCount);

DuplicateFirstFrameName

Duplicate the first animation frame so that the animation length matches the frame count. Animation is referenced by name.

UnityNativeChromaSDK.DuplicateFirstFrameName(string path, int frameCount);

DuplicateFirstFrameNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.DuplicateFirstFrameNameD(string path, double frameCount);

DuplicateFrames

Duplicate all the frames of the animation to double the animation length. Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. The animation is referenced by id.

UnityNativeChromaSDK.DuplicateFrames(int animationId);

DuplicateFramesName

Duplicate all the frames of the animation to double the animation length. Frame 1 becomes frame 1 and 2. Frame 2 becomes frame 3 and 4. And so on. The animation is referenced by name.

UnityNativeChromaSDK.DuplicateFramesName(string path);

DuplicateFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.DuplicateFramesNameD(string path);

DuplicateMirrorFrames

Duplicate all the animation frames in reverse so that the animation plays forwards and backwards. Animation is referenced by id.

UnityNativeChromaSDK.DuplicateMirrorFrames(int animationId);

DuplicateMirrorFramesName

Duplicate all the animation frames in reverse so that the animation plays forwards and backwards. Animation is referenced by name.

UnityNativeChromaSDK.DuplicateMirrorFramesName(string path);

DuplicateMirrorFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.DuplicateMirrorFramesNameD(string path);

FadeEndFrames

Fade the animation to black starting at the fade frame index to the end of the animation. Animation is referenced by id.

UnityNativeChromaSDK.FadeEndFrames(int animationId, int fade);

FadeEndFramesName

Fade the animation to black starting at the fade frame index to the end of the animation. Animation is referenced by name.

UnityNativeChromaSDK.FadeEndFramesName(string path, int fade);

FadeEndFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FadeEndFramesNameD(string path, double fade);

FadeStartFrames

Fade the animation from black to full color starting at 0 to the fade frame index. Animation is referenced by id.

UnityNativeChromaSDK.FadeStartFrames(int animationId, int fade);

FadeStartFramesName

Fade the animation from black to full color starting at 0 to the fade frame index. Animation is referenced by name.

UnityNativeChromaSDK.FadeStartFramesName(string path, int fade);

FadeStartFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FadeStartFramesNameD(string path, double fade);

FillColor

Set the RGB value for all colors in the specified frame. Animation is referenced by id.

UnityNativeChromaSDK.FillColor(int animationId, int frameId, int color);

FillColorAllFrames

Set the RGB value for all colors for all frames. Animation is referenced by id.

UnityNativeChromaSDK.FillColorAllFrames(int animationId, int color);

FillColorAllFramesName

Set the RGB value for all colors for all frames. Animation is referenced by name.

UnityNativeChromaSDK.FillColorAllFramesName(string path, int color);

FillColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillColorAllFramesNameD(string path, double color);

FillColorAllFramesRGB

Set the RGB value for all colors for all frames. Use the range of 0 to 255 for red, green, and blue parameters. Animation is referenced by id.

UnityNativeChromaSDK.FillColorAllFramesRGB(int animationId, int red, int green, int blue);

FillColorAllFramesRGBName

Set the RGB value for all colors for all frames. Use the range of 0 to 255 for red, green, and blue parameters. Animation is referenced by name.

UnityNativeChromaSDK.FillColorAllFramesRGBName(string path, int red, int green, int blue);

FillColorAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillColorAllFramesRGBNameD(string path, double red, double green, double blue);

FillColorName

Set the RGB value for all colors in the specified frame. Animation is referenced by name.

UnityNativeChromaSDK.FillColorName(string path, int frameId, int color);

FillColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillColorNameD(string path, double frameId, double color);

FillColorRGB

Set the RGB value for all colors in the specified frame. Animation is referenced by id.

UnityNativeChromaSDK.FillColorRGB(int animationId, int frameId, int red, int green, int blue);

FillColorRGBName

Set the RGB value for all colors in the specified frame. Animation is referenced by name.

UnityNativeChromaSDK.FillColorRGBName(string path, int frameId, int red, int green, int blue);

FillColorRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillColorRGBNameD(string path, double frameId, double red, double green, double blue);

FillNonZeroColor

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors in the specified frame. Animation is referenced by id.

UnityNativeChromaSDK.FillNonZeroColor(int animationId, int frameId, int color);

FillNonZeroColorAllFrames

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors for all frames. Animation is referenced by id.

UnityNativeChromaSDK.FillNonZeroColorAllFrames(int animationId, int color);

FillNonZeroColorAllFramesName

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors for all frames. Animation is referenced by name.

UnityNativeChromaSDK.FillNonZeroColorAllFramesName(string path, int color);

FillNonZeroColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillNonZeroColorAllFramesNameD(string path, double color);

FillNonZeroColorAllFramesRGB

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors for all frames. Use the range of 0 to 255 for red, green, and blue parameters. Animation is referenced by id.

UnityNativeChromaSDK.FillNonZeroColorAllFramesRGB(int animationId, int red, int green, int blue);

FillNonZeroColorAllFramesRGBName

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors for all frames. Use the range of 0 to 255 for red, green, and blue parameters. Animation is referenced by name.

UnityNativeChromaSDK.FillNonZeroColorAllFramesRGBName(string path, int red, int green, int blue);

FillNonZeroColorAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillNonZeroColorAllFramesRGBNameD(string path, double red, double green, double blue);

FillNonZeroColorName

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors in the specified frame. Animation is referenced by name.

UnityNativeChromaSDK.FillNonZeroColorName(string path, int frameId, int color);

FillNonZeroColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillNonZeroColorNameD(string path, double frameId, double color);

FillNonZeroColorRGB

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors in the specified frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation is referenced by id.

UnityNativeChromaSDK.FillNonZeroColorRGB(int animationId, int frameId, int red, int green, int blue);

FillNonZeroColorRGBName

This method will only update colors in the animation that are not already set to black. Set the RGB value for a subset of colors in the specified frame. Use the range of 0 to 255 for red, green, and blue parameters. Animation is referenced by name.

UnityNativeChromaSDK.FillNonZeroColorRGBName(string path, int frameId, int red, int green, int blue);

FillNonZeroColorRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillNonZeroColorRGBNameD(string path, double frameId, double red, double green, double blue);

FillRandomColors

Fill the frame with random RGB values for the given frame. Animation is referenced by id.

UnityNativeChromaSDK.FillRandomColors(int animationId, int frameId);

FillRandomColorsAllFrames

Fill the frame with random RGB values for all frames. Animation is referenced by id.

UnityNativeChromaSDK.FillRandomColorsAllFrames(int animationId);

FillRandomColorsAllFramesName

Fill the frame with random RGB values for all frames. Animation is referenced by name.

UnityNativeChromaSDK.FillRandomColorsAllFramesName(string path);

FillRandomColorsAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillRandomColorsAllFramesNameD(string path);

FillRandomColorsBlackAndWhite

Fill the frame with random black and white values for the specified frame. Animation is referenced by id.

UnityNativeChromaSDK.FillRandomColorsBlackAndWhite(int animationId, int frameId);

FillRandomColorsBlackAndWhiteAllFrames

Fill the frame with random black and white values for all frames. Animation is referenced by id.

UnityNativeChromaSDK.FillRandomColorsBlackAndWhiteAllFrames(int animationId);

FillRandomColorsBlackAndWhiteAllFramesName

Fill the frame with random black and white values for all frames. Animation is referenced by name.

UnityNativeChromaSDK.FillRandomColorsBlackAndWhiteAllFramesName(string path);

FillRandomColorsBlackAndWhiteAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillRandomColorsBlackAndWhiteAllFramesNameD(string path);

FillRandomColorsBlackAndWhiteName

Fill the frame with random black and white values for the specified frame. Animation is referenced by name.

UnityNativeChromaSDK.FillRandomColorsBlackAndWhiteName(string path, int frameId);

FillRandomColorsBlackAndWhiteNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillRandomColorsBlackAndWhiteNameD(string path, double frameId);

FillRandomColorsName

Fill the frame with random RGB values for the given frame. Animation is referenced by name.

UnityNativeChromaSDK.FillRandomColorsName(string path, int frameId);

FillRandomColorsNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillRandomColorsNameD(string path, double frameId);

FillThresholdColors

Fill the specified frame with RGB color where the animation color is less than the RGB threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdColors(int animationId, int frameId, int threshold, int color);

FillThresholdColorsAllFrames

Fill all frames with RGB color where the animation color is less than the RGB threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdColorsAllFrames(int animationId, int threshold, int color);

FillThresholdColorsAllFramesName

Fill all frames with RGB color where the animation color is less than the RGB threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdColorsAllFramesName(string path, int threshold, int color);

FillThresholdColorsAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdColorsAllFramesNameD(string path, double threshold, double color);

FillThresholdColorsAllFramesRGB

Fill all frames with RGB color where the animation color is less than the threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdColorsAllFramesRGB(int animationId, int threshold, int red, int green, int blue);

FillThresholdColorsAllFramesRGBName

Fill all frames with RGB color where the animation color is less than the threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdColorsAllFramesRGBName(string path, int threshold, int red, int green, int blue);

FillThresholdColorsAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdColorsAllFramesRGBNameD(string path, double threshold, double red, double green, double blue);

FillThresholdColorsMinMaxAllFramesRGB

Fill all frames with the min RGB color where the animation color is less than the min threshold AND with the max RGB color where the animation is more than the max threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdColorsMinMaxAllFramesRGB(int animationId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue);

FillThresholdColorsMinMaxAllFramesRGBName

Fill all frames with the min RGB color where the animation color is less than the min threshold AND with the max RGB color where the animation is more than the max threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdColorsMinMaxAllFramesRGBName(string path, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue);

FillThresholdColorsMinMaxAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdColorsMinMaxAllFramesRGBNameD(string path, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue);

FillThresholdColorsMinMaxRGB

Fill the specified frame with the min RGB color where the animation color is less than the min threshold AND with the max RGB color where the animation is more than the max threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdColorsMinMaxRGB(int animationId, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue);

FillThresholdColorsMinMaxRGBName

Fill the specified frame with the min RGB color where the animation color is less than the min threshold AND with the max RGB color where the animation is more than the max threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdColorsMinMaxRGBName(string path, int frameId, int minThreshold, int minRed, int minGreen, int minBlue, int maxThreshold, int maxRed, int maxGreen, int maxBlue);

FillThresholdColorsMinMaxRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdColorsMinMaxRGBNameD(string path, double frameId, double minThreshold, double minRed, double minGreen, double minBlue, double maxThreshold, double maxRed, double maxGreen, double maxBlue);

FillThresholdColorsName

Fill the specified frame with RGB color where the animation color is less than the RGB threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdColorsName(string path, int frameId, int threshold, int color);

FillThresholdColorsNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdColorsNameD(string path, double frameId, double threshold, double color);

FillThresholdColorsRGB

Fill the specified frame with RGB color where the animation color is less than the RGB threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdColorsRGB(int animationId, int frameId, int threshold, int red, int green, int blue);

FillThresholdColorsRGBName

Fill the specified frame with RGB color where the animation color is less than the RGB threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdColorsRGBName(string path, int frameId, int threshold, int red, int green, int blue);

FillThresholdColorsRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdColorsRGBNameD(string path, double frameId, double threshold, double red, double green, double blue);

FillThresholdRGBColorsAllFramesRGB

Fill all frames with RGB color where the animation color is less than the RGB threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdRGBColorsAllFramesRGB(int animationId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue);

FillThresholdRGBColorsAllFramesRGBName

Fill all frames with RGB color where the animation color is less than the RGB threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdRGBColorsAllFramesRGBName(string path, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue);

FillThresholdRGBColorsAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdRGBColorsAllFramesRGBNameD(string path, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue);

FillThresholdRGBColorsRGB

Fill the specified frame with RGB color where the animation color is less than the RGB threshold. Animation is referenced by id.

UnityNativeChromaSDK.FillThresholdRGBColorsRGB(int animationId, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue);

FillThresholdRGBColorsRGBName

Fill the specified frame with RGB color where the animation color is less than the RGB threshold. Animation is referenced by name.

UnityNativeChromaSDK.FillThresholdRGBColorsRGBName(string path, int frameId, int redThreshold, int greenThreshold, int blueThreshold, int red, int green, int blue);

FillThresholdRGBColorsRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillThresholdRGBColorsRGBNameD(string path, double frameId, double redThreshold, double greenThreshold, double blueThreshold, double red, double green, double blue);

FillZeroColor

Fill the specified frame with RGB color where the animation color is zero. Animation is referenced by id.

UnityNativeChromaSDK.FillZeroColor(int animationId, int frameId, int color);

FillZeroColorAllFrames

Fill all frames with RGB color where the animation color is zero. Animation is referenced by id.

UnityNativeChromaSDK.FillZeroColorAllFrames(int animationId, int color);

FillZeroColorAllFramesName

Fill all frames with RGB color where the animation color is zero. Animation is referenced by name.

UnityNativeChromaSDK.FillZeroColorAllFramesName(string path, int color);

FillZeroColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillZeroColorAllFramesNameD(string path, double color);

FillZeroColorAllFramesRGB

Fill all frames with RGB color where the animation color is zero. Animation is referenced by id.

UnityNativeChromaSDK.FillZeroColorAllFramesRGB(int animationId, int red, int green, int blue);

FillZeroColorAllFramesRGBName

Fill all frames with RGB color where the animation color is zero. Animation is referenced by name.

UnityNativeChromaSDK.FillZeroColorAllFramesRGBName(string path, int red, int green, int blue);

FillZeroColorAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillZeroColorAllFramesRGBNameD(string path, double red, double green, double blue);

FillZeroColorName

Fill the specified frame with RGB color where the animation color is zero. Animation is referenced by name.

UnityNativeChromaSDK.FillZeroColorName(string path, int frameId, int color);

FillZeroColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillZeroColorNameD(string path, double frameId, double color);

FillZeroColorRGB

Fill the specified frame with RGB color where the animation color is zero. Animation is referenced by id.

UnityNativeChromaSDK.FillZeroColorRGB(int animationId, int frameId, int red, int green, int blue);

FillZeroColorRGBName

Fill the specified frame with RGB color where the animation color is zero. Animation is referenced by name.

UnityNativeChromaSDK.FillZeroColorRGBName(string path, int frameId, int red, int green, int blue);

FillZeroColorRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.FillZeroColorRGBNameD(string path, double frameId, double red, double green, double blue);

Get1DColor

Get the animation color for a frame given the 1D led. The led should be greater than or equal to 0 and less than the MaxLeds. Animation is referenced by id.

int result = UnityNativeChromaSDK.Get1DColor(int animationId, int frameId, int led);

Get1DColorName

Get the animation color for a frame given the 1D led. The led should be greater than or equal to 0 and less than the MaxLeds. Animation is referenced by name.

int result = UnityNativeChromaSDK.Get1DColorName(string path, int frameId, int led);

Get1DColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.Get1DColorNameD(string path, double frameId, double led);

Get2DColor

Get the animation color for a frame given the 2D row and column. The row should be greater than or equal to 0 and less than the MaxRow. The column should be greater than or equal to 0 and less than the MaxColumn. Animation is referenced by id.

int result = UnityNativeChromaSDK.Get2DColor(int animationId, int frameId, int row, int column);

Get2DColorName

Get the animation color for a frame given the 2D row and column. The row should be greater than or equal to 0 and less than the MaxRow. The column should be greater than or equal to 0 and less than the MaxColumn. Animation is referenced by name.

int result = UnityNativeChromaSDK.Get2DColorName(string path, int frameId, int row, int column);

Get2DColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.Get2DColorNameD(string path, double frameId, double row, double column);

GetAnimation

Get the animation id for the named animation.

int result = UnityNativeChromaSDK.GetAnimation(string name);

GetAnimationCount

PluginGetAnimationCount will return the number of loaded animations.

int result = UnityNativeChromaSDK.GetAnimationCount();

GetAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetAnimationD(string name);

GetAnimationId

PluginGetAnimationId will return the animationId given the index of the loaded animation. The index is zero-based and less than the number returned by PluginGetAnimationCount. Use PluginGetAnimationName to get the name of the animation.

int result = UnityNativeChromaSDK.GetAnimationId(int index);

GetAnimationName

PluginGetAnimationName takes an animationId and returns the name of the animation of the .chroma animation file. If a name is not available then an empty string will be returned.

string result = UnityNativeChromaSDK.GetAnimationName(int animationId);

GetCurrentFrame

Get the current frame of the animation referenced by id.

int result = UnityNativeChromaSDK.GetCurrentFrame(int animationId);

GetCurrentFrameName

Get the current frame of the animation referenced by name.

int result = UnityNativeChromaSDK.GetCurrentFrameName(string path);

GetCurrentFrameNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetCurrentFrameNameD(string path);

GetDevice

Returns the EChromaSDKDevice1DEnum or EChromaSDKDevice2DEnum of a Chroma animation respective to the deviceType, as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetDevice(int animationId);

GetDeviceName

Returns the EChromaSDKDevice1DEnum or EChromaSDKDevice2DEnum of a Chroma animation respective to the deviceType, as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetDeviceName(string path);

GetDeviceNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetDeviceNameD(string path);

GetDeviceType

Returns the EChromaSDKDeviceTypeEnum of a Chroma animation as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetDeviceType(int animationId);

GetDeviceTypeName

Returns the EChromaSDKDeviceTypeEnum of a Chroma animation as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetDeviceTypeName(string path);

GetDeviceTypeNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetDeviceTypeNameD(string path);

GetFrame

Gets the frame colors and duration (in seconds) for a Chroma animation. The color is expected to be an array of the expected dimensions for the deviceType/device. The length parameter is the size of the color array. For EChromaSDKDevice1DEnum the array size should be MAX LEDS. For EChromaSDKDevice2DEnum the array size should be MAX ROW * MAX COLUMN. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetFrame(int animationId, int frameIndex, out float duration, int[] colors, int length);

GetFrameCount

Returns the frame count of a Chroma animation upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetFrameCount(int animationId);

GetFrameCountName

Returns the frame count of a Chroma animation upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetFrameCountName(string path);

GetFrameCountNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetFrameCountNameD(string path);

GetKeyColor

Get the color of an animation key for the given frame referenced by id.

int result = UnityNativeChromaSDK.GetKeyColor(int animationId, int frameId, int rzkey);

GetKeyColorD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetKeyColorD(string path, double frameId, double rzkey);

GetKeyColorName

Get the color of an animation key for the given frame referenced by name.

int result = UnityNativeChromaSDK.GetKeyColorName(string path, int frameId, int rzkey);

GetLibraryLoadedState

Returns RZRESULT_SUCCESS if the plugin has been initialized successfully. Returns RZRESULT_DLL_NOT_FOUND if core Chroma library is not found. Returns RZRESULT_DLL_INVALID_SIGNATURE if core Chroma library has an invalid signature.

long result = UnityNativeChromaSDK.GetLibraryLoadedState();

GetLibraryLoadedStateD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetLibraryLoadedStateD();

GetMaxColumn

Returns the MAX COLUMN given the EChromaSDKDevice2DEnum device as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetMaxColumn(Device2D device);

GetMaxColumnD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetMaxColumnD(double device);

GetMaxLeds

Returns the MAX LEDS given the EChromaSDKDevice1DEnum device as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetMaxLeds(Device1D device);

GetMaxLedsD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetMaxLedsD(double device);

GetMaxRow

Returns the MAX ROW given the EChromaSDKDevice2DEnum device as an integer upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.GetMaxRow(Device2D device);

GetMaxRowD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetMaxRowD(double device);

GetPlayingAnimationCount

PluginGetPlayingAnimationCount will return the number of playing animations.

int result = UnityNativeChromaSDK.GetPlayingAnimationCount();

GetPlayingAnimationId

PluginGetPlayingAnimationId will return the animationId given the index of the playing animation. The index is zero-based and less than the number returned by PluginGetPlayingAnimationCount. Use PluginGetAnimationName to get the name of the animation.

int result = UnityNativeChromaSDK.GetPlayingAnimationId(int index);

GetRGB

Get the RGB color given red, green, and blue.

int result = UnityNativeChromaSDK.GetRGB(int red, int green, int blue);

GetRGBD

D suffix for limited data types.

double result = UnityNativeChromaSDK.GetRGBD(double red, double green, double blue);

HasAnimationLoop

Check if the animation has loop enabled referenced by id.

bool result = UnityNativeChromaSDK.HasAnimationLoop(int animationId);

HasAnimationLoopName

Check if the animation has loop enabled referenced by name.

bool result = UnityNativeChromaSDK.HasAnimationLoopName(string path);

HasAnimationLoopNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.HasAnimationLoopNameD(string path);

Init

Initialize the ChromaSDK. Zero indicates success, otherwise failure. Many API methods auto initialize the ChromaSDK if not already initialized.

long result = UnityNativeChromaSDK.Init();

InitD

D suffix for limited data types.

double result = UnityNativeChromaSDK.InitD();

InsertDelay

Insert an animation delay by duplicating the frame by the delay number of times. Animation is referenced by id.

UnityNativeChromaSDK.InsertDelay(int animationId, int frameId, int delay);

InsertDelayName

Insert an animation delay by duplicating the frame by the delay number of times. Animation is referenced by name.

UnityNativeChromaSDK.InsertDelayName(string path, int frameId, int delay);

InsertDelayNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.InsertDelayNameD(string path, double frameId, double delay);

InsertFrame

Duplicate the source frame index at the target frame index. Animation is referenced by id.

UnityNativeChromaSDK.InsertFrame(int animationId, int sourceFrame, int targetFrame);

InsertFrameName

Duplicate the source frame index at the target frame index. Animation is referenced by name.

UnityNativeChromaSDK.InsertFrameName(string path, int sourceFrame, int targetFrame);

InsertFrameNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.InsertFrameNameD(string path, double sourceFrame, double targetFrame);

InvertColors

Invert all the colors at the specified frame. Animation is referenced by id.

UnityNativeChromaSDK.InvertColors(int animationId, int frameId);

InvertColorsAllFrames

Invert all the colors for all frames. Animation is referenced by id.

UnityNativeChromaSDK.InvertColorsAllFrames(int animationId);

InvertColorsAllFramesName

Invert all the colors for all frames. Animation is referenced by name.

UnityNativeChromaSDK.InvertColorsAllFramesName(string path);

InvertColorsAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.InvertColorsAllFramesNameD(string path);

InvertColorsName

Invert all the colors at the specified frame. Animation is referenced by name.

UnityNativeChromaSDK.InvertColorsName(string path, int frameId);

InvertColorsNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.InvertColorsNameD(string path, double frameId);

IsAnimationPaused

Check if the animation is paused referenced by id.

bool result = UnityNativeChromaSDK.IsAnimationPaused(int animationId);

IsAnimationPausedName

Check if the animation is paused referenced by name.

bool result = UnityNativeChromaSDK.IsAnimationPausedName(string path);

IsAnimationPausedNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsAnimationPausedNameD(string path);

IsDialogOpen

The editor dialog is a non-blocking modal window, this method returns true if the modal window is open, otherwise false.

bool result = UnityNativeChromaSDK.IsDialogOpen();

IsDialogOpenD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsDialogOpenD();

IsInitialized

Returns true if the plugin has been initialized. Returns false if the plugin is uninitialized.

bool result = UnityNativeChromaSDK.IsInitialized();

IsInitializedD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsInitializedD();

IsPlatformSupported

If the method can be invoked the method returns true.

bool result = UnityNativeChromaSDK.IsPlatformSupported();

IsPlatformSupportedD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsPlatformSupportedD();

IsPlaying

PluginIsPlayingName automatically handles initializing the ChromaSDK. The named .chroma animation file will be automatically opened. The method will return whether the animation is playing or not. Animation is referenced by id.

bool result = UnityNativeChromaSDK.IsPlaying(int animationId);

IsPlayingD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsPlayingD(double animationId);

IsPlayingName

PluginIsPlayingName automatically handles initializing the ChromaSDK. The named .chroma animation file will be automatically opened. The method will return whether the animation is playing or not. Animation is referenced by name.

bool result = UnityNativeChromaSDK.IsPlayingName(string path);

IsPlayingNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsPlayingNameD(string path);

IsPlayingType

PluginIsPlayingType automatically handles initializing the ChromaSDK. If any animation is playing for the deviceType and device combination, the method will return true, otherwise false.

bool result = UnityNativeChromaSDK.IsPlayingType(int deviceType, int device);

IsPlayingTypeD

D suffix for limited data types.

double result = UnityNativeChromaSDK.IsPlayingTypeD(double deviceType, double device);

Lerp

Do a lerp math operation on a float.

float result = UnityNativeChromaSDK.Lerp(float start, float end, float amt);

LerpColor

Lerp from one color to another given t in the range 0.0 to 1.0.

int result = UnityNativeChromaSDK.LerpColor(int from, int to, float t);

LoadAnimation

Loads Chroma effects so that the animation can be played immediately. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.LoadAnimation(int animationId);

LoadAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.LoadAnimationD(double animationId);

LoadAnimationName

Load the named animation.

UnityNativeChromaSDK.LoadAnimationName(string path);

LoadComposite

Load a composite set of animations.

UnityNativeChromaSDK.LoadComposite(string name);

MakeBlankFrames

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color defaults to color. Animation is referenced by id.

UnityNativeChromaSDK.MakeBlankFrames(int animationId, int frameCount, float duration, int color);

MakeBlankFramesName

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color defaults to color. Animation is referenced by name.

UnityNativeChromaSDK.MakeBlankFramesName(string path, int frameCount, float duration, int color);

MakeBlankFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MakeBlankFramesNameD(string path, double frameCount, double duration, double color);

MakeBlankFramesRandom

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color is random. Animation is referenced by id.

UnityNativeChromaSDK.MakeBlankFramesRandom(int animationId, int frameCount, float duration);

MakeBlankFramesRandomBlackAndWhite

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color is random black and white. Animation is referenced by id.

UnityNativeChromaSDK.MakeBlankFramesRandomBlackAndWhite(int animationId, int frameCount, float duration);

MakeBlankFramesRandomBlackAndWhiteName

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color is random black and white. Animation is referenced by name.

UnityNativeChromaSDK.MakeBlankFramesRandomBlackAndWhiteName(string path, int frameCount, float duration);

MakeBlankFramesRandomBlackAndWhiteNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MakeBlankFramesRandomBlackAndWhiteNameD(string path, double frameCount, double duration);

MakeBlankFramesRandomName

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color is random. Animation is referenced by name.

UnityNativeChromaSDK.MakeBlankFramesRandomName(string path, int frameCount, float duration);

MakeBlankFramesRandomNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MakeBlankFramesRandomNameD(string path, double frameCount, double duration);

MakeBlankFramesRGB

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color defaults to color. Animation is referenced by id.

UnityNativeChromaSDK.MakeBlankFramesRGB(int animationId, int frameCount, float duration, int red, int green, int blue);

MakeBlankFramesRGBName

Make a blank animation for the length of the frame count. Frame duration defaults to the duration. The frame color defaults to color. Animation is referenced by name.

UnityNativeChromaSDK.MakeBlankFramesRGBName(string path, int frameCount, float duration, int red, int green, int blue);

MakeBlankFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MakeBlankFramesRGBNameD(string path, double frameCount, double duration, double red, double green, double blue);

MirrorHorizontally

Flips the color grid horizontally for all Chroma animation frames. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.MirrorHorizontally(int animationId);

MirrorVertically

Flips the color grid vertically for all Chroma animation frames. This method has no effect for EChromaSDKDevice1DEnum devices. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.MirrorVertically(int animationId);

MultiplyColorLerpAllFrames

Multiply the color intensity with the lerp result from color 1 to color 2 using the frame index divided by the frame count for the t parameter. Animation is referenced in id.

UnityNativeChromaSDK.MultiplyColorLerpAllFrames(int animationId, int color1, int color2);

MultiplyColorLerpAllFramesName

Multiply the color intensity with the lerp result from color 1 to color 2 using the frame index divided by the frame count for the t parameter. Animation is referenced in name.

UnityNativeChromaSDK.MultiplyColorLerpAllFramesName(string path, int color1, int color2);

MultiplyColorLerpAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyColorLerpAllFramesNameD(string path, double color1, double color2);

MultiplyIntensity

Multiply all the colors in the frame by the intensity value. The valid the intensity range is from 0.0 to 255.0. RGB components are multiplied equally. An intensity of 0.5 would half the color value. Black colors in the frame will not be affected by this method.

UnityNativeChromaSDK.MultiplyIntensity(int animationId, int frameId, float intensity);

MultiplyIntensityAllFrames

Multiply all the colors for all frames by the intensity value. The valid the intensity range is from 0.0 to 255.0. RGB components are multiplied equally. An intensity of 0.5 would half the color value. Black colors in the frame will not be affected by this method.

UnityNativeChromaSDK.MultiplyIntensityAllFrames(int animationId, float intensity);

MultiplyIntensityAllFramesName

Multiply all the colors for all frames by the intensity value. The valid the intensity range is from 0.0 to 255.0. RGB components are multiplied equally. An intensity of 0.5 would half the color value. Black colors in the frame will not be affected by this method.

UnityNativeChromaSDK.MultiplyIntensityAllFramesName(string path, float intensity);

MultiplyIntensityAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyIntensityAllFramesNameD(string path, double intensity);

MultiplyIntensityAllFramesRGB

Multiply all frames by the RBG color intensity. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyIntensityAllFramesRGB(int animationId, int red, int green, int blue);

MultiplyIntensityAllFramesRGBName

Multiply all frames by the RBG color intensity. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyIntensityAllFramesRGBName(string path, int red, int green, int blue);

MultiplyIntensityAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyIntensityAllFramesRGBNameD(string path, double red, double green, double blue);

MultiplyIntensityColor

Multiply the specific frame by the RBG color intensity. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyIntensityColor(int animationId, int frameId, int color);

MultiplyIntensityColorAllFrames

Multiply all frames by the RBG color intensity. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyIntensityColorAllFrames(int animationId, int color);

MultiplyIntensityColorAllFramesName

Multiply all frames by the RBG color intensity. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyIntensityColorAllFramesName(string path, int color);

MultiplyIntensityColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyIntensityColorAllFramesNameD(string path, double color);

MultiplyIntensityColorName

Multiply the specific frame by the RBG color intensity. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyIntensityColorName(string path, int frameId, int color);

MultiplyIntensityColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyIntensityColorNameD(string path, double frameId, double color);

MultiplyIntensityName

Multiply all the colors in the frame by the intensity value. The valid the intensity range is from 0.0 to 255.0. RGB components are multiplied equally. An intensity of 0.5 would half the color value. Black colors in the frame will not be affected by this method.

UnityNativeChromaSDK.MultiplyIntensityName(string path, int frameId, float intensity);

MultiplyIntensityNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyIntensityNameD(string path, double frameId, double intensity);

MultiplyIntensityRGB

Multiply the specific frame by the RBG color intensity. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyIntensityRGB(int animationId, int frameId, int red, int green, int blue);

MultiplyIntensityRGBName

Multiply the specific frame by the RBG color intensity. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyIntensityRGBName(string path, int frameId, int red, int green, int blue);

MultiplyIntensityRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyIntensityRGBNameD(string path, double frameId, double red, double green, double blue);

MultiplyNonZeroTargetColorLerp

Multiply the specific frame by the color lerp result between color 1 and 2 using the frame color value as the t value. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerp(int animationId, int frameId, int color1, int color2);

MultiplyNonZeroTargetColorLerpAllFrames

Multiply all frames by the color lerp result between color 1 and 2 using the frame color value as the t value. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerpAllFrames(int animationId, int color1, int color2);

MultiplyNonZeroTargetColorLerpAllFramesName

Multiply all frames by the color lerp result between color 1 and 2 using the frame color value as the t value. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerpAllFramesName(string path, int color1, int color2);

MultiplyNonZeroTargetColorLerpAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerpAllFramesNameD(string path, double color1, double color2);

MultiplyNonZeroTargetColorLerpAllFramesRGB

Multiply the specific frame by the color lerp result between RGB 1 and 2 using the frame color value as the t value. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2);

MultiplyNonZeroTargetColorLerpAllFramesRGBName

Multiply the specific frame by the color lerp result between RGB 1 and 2 using the frame color value as the t value. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerpAllFramesRGBName(string path, int red1, int green1, int blue1, int red2, int green2, int blue2);

MultiplyNonZeroTargetColorLerpAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyNonZeroTargetColorLerpAllFramesRGBNameD(string path, double red1, double green1, double blue1, double red2, double green2, double blue2);

MultiplyTargetColorLerp

Multiply the specific frame by the color lerp result between color 1 and 2 using the frame color value as the t value. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyTargetColorLerp(int animationId, int frameId, int color1, int color2);

MultiplyTargetColorLerpAllFrames

Multiply all frames by the color lerp result between color 1 and 2 using the frame color value as the t value. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyTargetColorLerpAllFrames(int animationId, int color1, int color2);

MultiplyTargetColorLerpAllFramesName

Multiply all frames by the color lerp result between color 1 and 2 using the frame color value as the t value. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyTargetColorLerpAllFramesName(string path, int color1, int color2);

MultiplyTargetColorLerpAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyTargetColorLerpAllFramesNameD(string path, double color1, double color2);

MultiplyTargetColorLerpAllFramesRGB

Multiply all frames by the color lerp result between RGB 1 and 2 using the frame color value as the t value. Animation is referenced by id.

UnityNativeChromaSDK.MultiplyTargetColorLerpAllFramesRGB(int animationId, int red1, int green1, int blue1, int red2, int green2, int blue2);

MultiplyTargetColorLerpAllFramesRGBName

Multiply all frames by the color lerp result between RGB 1 and 2 using the frame color value as the t value. Animation is referenced by name.

UnityNativeChromaSDK.MultiplyTargetColorLerpAllFramesRGBName(string path, int red1, int green1, int blue1, int red2, int green2, int blue2);

MultiplyTargetColorLerpAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.MultiplyTargetColorLerpAllFramesRGBNameD(string path, double red1, double green1, double blue1, double red2, double green2, double blue2);

OffsetColors

Offset all colors in the frame using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetColors(int animationId, int frameId, int red, int green, int blue);

OffsetColorsAllFrames

Offset all colors for all frames using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetColorsAllFrames(int animationId, int red, int green, int blue);

OffsetColorsAllFramesName

Offset all colors for all frames using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetColorsAllFramesName(string path, int red, int green, int blue);

OffsetColorsAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OffsetColorsAllFramesNameD(string path, double red, double green, double blue);

OffsetColorsName

Offset all colors in the frame using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetColorsName(string path, int frameId, int red, int green, int blue);

OffsetColorsNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OffsetColorsNameD(string path, double frameId, double red, double green, double blue);

OffsetNonZeroColors

This method will only update colors in the animation that are not already set to black. Offset a subset of colors in the frame using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetNonZeroColors(int animationId, int frameId, int red, int green, int blue);

OffsetNonZeroColorsAllFrames

This method will only update colors in the animation that are not already set to black. Offset a subset of colors for all frames using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetNonZeroColorsAllFrames(int animationId, int red, int green, int blue);

OffsetNonZeroColorsAllFramesName

This method will only update colors in the animation that are not already set to black. Offset a subset of colors for all frames using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetNonZeroColorsAllFramesName(string path, int red, int green, int blue);

OffsetNonZeroColorsAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OffsetNonZeroColorsAllFramesNameD(string path, double red, double green, double blue);

OffsetNonZeroColorsName

This method will only update colors in the animation that are not already set to black. Offset a subset of colors in the frame using the RGB offset. Use the range of -255 to 255 for red, green, and blue parameters. Negative values remove color. Positive values add color.

UnityNativeChromaSDK.OffsetNonZeroColorsName(string path, int frameId, int red, int green, int blue);

OffsetNonZeroColorsNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OffsetNonZeroColorsNameD(string path, double frameId, double red, double green, double blue);

OpenAnimation

Opens a Chroma animation file so that it can be played. Returns an animation id >= 0 upon success. Returns -1 if there was a failure. The animation id is used in most of the API methods.

int result = UnityNativeChromaSDK.OpenAnimation(string path);

OpenAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OpenAnimationD(string path);

OpenAnimationFromMemory

Opens a Chroma animation data from memory so that it can be played. Data is a pointer to byte array of the loaded animation in memory. Name will be assigned to the animation when loaded. Returns an animation id >= 0 upon success. Returns -1 if there was a failure. The animation id is used in most of the API methods.

int result = UnityNativeChromaSDK.OpenAnimationFromMemory(byte[] data, string name);

OpenEditorDialog

Opens a Chroma animation file with the .chroma extension. Returns zero upon success. Returns -1 if there was a failure.

int result = UnityNativeChromaSDK.OpenEditorDialog(string path);

OpenEditorDialogAndPlay

Open the named animation in the editor dialog and play the animation at start.

int result = UnityNativeChromaSDK.OpenEditorDialogAndPlay(string path);

OpenEditorDialogAndPlayD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OpenEditorDialogAndPlayD(string path);

OpenEditorDialogD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OpenEditorDialogD(string path);

OverrideFrameDuration

Sets the duration for all grames in the Chroma animation to the duration parameter. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.OverrideFrameDuration(int animationId, float duration);

OverrideFrameDurationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.OverrideFrameDurationD(double animationId, double duration);

OverrideFrameDurationName

Override the duration of all frames with the duration value. Animation is referenced by name.

UnityNativeChromaSDK.OverrideFrameDurationName(string path, float duration);

PauseAnimation

Pause the current animation referenced by id.

UnityNativeChromaSDK.PauseAnimation(int animationId);

PauseAnimationName

Pause the current animation referenced by name.

UnityNativeChromaSDK.PauseAnimationName(string path);

PauseAnimationNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.PauseAnimationNameD(string path);

PlayAnimation

Plays the Chroma animation. This will load the animation, if not loaded previously. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.PlayAnimation(int animationId);

PlayAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.PlayAnimationD(double animationId);

PlayAnimationFrame

PluginPlayAnimationFrame automatically handles initializing the ChromaSDK. The method will play the animation given the animationId with looping on or off starting at the frameId.

UnityNativeChromaSDK.PlayAnimationFrame(int animationId, int frameId, bool loop);

PlayAnimationFrameName

PluginPlayAnimationFrameName automatically handles initializing the ChromaSDK. The named .chroma animation file will be automatically opened. The animation will play with looping on or off starting at the frameId.

UnityNativeChromaSDK.PlayAnimationFrameName(string path, int frameId, bool loop);

PlayAnimationFrameNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.PlayAnimationFrameNameD(string path, double frameId, double loop);

PlayAnimationLoop

PluginPlayAnimationLoop automatically handles initializing the ChromaSDK. The method will play the animation given the animationId with looping on or off.

UnityNativeChromaSDK.PlayAnimationLoop(int animationId, bool loop);

PlayAnimationName

PluginPlayAnimationName automatically handles initializing the ChromaSDK. The named .chroma animation file will be automatically opened. The animation will play with looping on or off.

UnityNativeChromaSDK.PlayAnimationName(string path, bool loop);

PlayAnimationNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.PlayAnimationNameD(string path, double loop);

PlayComposite

PluginPlayComposite automatically handles initializing the ChromaSDK. The named animation files for the .chroma set will be automatically opened. The set of animations will play with looping on or off.

UnityNativeChromaSDK.PlayComposite(string name, bool loop);

PlayCompositeD

D suffix for limited data types.

double result = UnityNativeChromaSDK.PlayCompositeD(string name, double loop);

PreviewFrame

Displays the Chroma animation frame on Chroma hardware given the frameIndex. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.PreviewFrame(int animationId, int frameIndex);

PreviewFrameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.PreviewFrameD(double animationId, double frameIndex);

PreviewFrameName

Displays the Chroma animation frame on Chroma hardware given the frameIndex. Animaton is referenced by name.

UnityNativeChromaSDK.PreviewFrameName(string path, int frameIndex);

ReduceFrames

Reduce the frames of the animation by removing every nth element. Animation is referenced by id.

UnityNativeChromaSDK.ReduceFrames(int animationId, int n);

ReduceFramesName

Reduce the frames of the animation by removing every nth element. Animation is referenced by name.

UnityNativeChromaSDK.ReduceFramesName(string path, int n);

ReduceFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.ReduceFramesNameD(string path, double n);

ResetAnimation

Resets the Chroma animation to 1 blank frame. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.ResetAnimation(int animationId);

ResumeAnimation

Resume the animation with loop ON or OFF referenced by id.

UnityNativeChromaSDK.ResumeAnimation(int animationId, bool loop);

ResumeAnimationName

Resume the animation with loop ON or OFF referenced by name.

UnityNativeChromaSDK.ResumeAnimationName(string path, bool loop);

ResumeAnimationNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.ResumeAnimationNameD(string path, double loop);

Reverse

Reverse the animation frame order of the Chroma animation. Returns the animation id upon success. Returns -1 upon failure. Animation is referenced by id.

int result = UnityNativeChromaSDK.Reverse(int animationId);

ReverseAllFrames

Reverse the animation frame order of the Chroma animation. Animation is referenced by id.

UnityNativeChromaSDK.ReverseAllFrames(int animationId);

ReverseAllFramesName

Reverse the animation frame order of the Chroma animation. Animation is referenced by name.

UnityNativeChromaSDK.ReverseAllFramesName(string path);

ReverseAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.ReverseAllFramesNameD(string path);

SaveAnimation

Save the animation referenced by id to the path specified.

int result = UnityNativeChromaSDK.SaveAnimation(int animationId, string path);

SaveAnimationName

Save the named animation to the target path specified.

int result = UnityNativeChromaSDK.SaveAnimationName(string sourceAnimation, string targetAnimation);

Set1DColor

Set the animation color for a frame given the 1D led. The led should be greater than or equal to 0 and less than the MaxLeds. The animation is referenced by id.

UnityNativeChromaSDK.Set1DColor(int animationId, int frameId, int led, int color);

Set1DColorName

Set the animation color for a frame given the 1D led. The led should be greater than or equal to 0 and less than the MaxLeds. The animation is referenced by name.

UnityNativeChromaSDK.Set1DColorName(string path, int frameId, int led, int color);

Set1DColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.Set1DColorNameD(string path, double frameId, double led, double color);

Set2DColor

Set the animation color for a frame given the 2D row and column. The row should be greater than or equal to 0 and less than the MaxRow. The column should be greater than or equal to 0 and less than the MaxColumn. The animation is referenced by id.

UnityNativeChromaSDK.Set2DColor(int animationId, int frameId, int row, int column, int color);

Set2DColorName

Set the animation color for a frame given the 2D row and column. The row should be greater than or equal to 0 and less than the MaxRow. The column should be greater than or equal to 0 and less than the MaxColumn. The animation is referenced by name.

UnityNativeChromaSDK.Set2DColorName(string path, int frameId, int row, int column, int color);

Set2DColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.Set2DColorNameD(string path, double frameId, double rowColumnIndex, double color);

SetChromaCustomColorAllFrames

When custom color is set, the custom key mode will be used. The animation is referenced by id.

UnityNativeChromaSDK.SetChromaCustomColorAllFrames(int animationId);

SetChromaCustomColorAllFramesName

When custom color is set, the custom key mode will be used. The animation is referenced by name.

UnityNativeChromaSDK.SetChromaCustomColorAllFramesName(string path);

SetChromaCustomColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetChromaCustomColorAllFramesNameD(string path);

SetChromaCustomFlag

Set the Chroma custom key color flag on all frames. True changes the layout from grid to key. True changes the layout from key to grid. Animation is referenced by id.

UnityNativeChromaSDK.SetChromaCustomFlag(int animationId, bool flag);

SetChromaCustomFlagName

Set the Chroma custom key color flag on all frames. True changes the layout from grid to key. True changes the layout from key to grid. Animation is referenced by name.

UnityNativeChromaSDK.SetChromaCustomFlagName(string path, bool flag);

SetChromaCustomFlagNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetChromaCustomFlagNameD(string path, double flag);

SetCurrentFrame

Set the current frame of the animation referenced by id.

UnityNativeChromaSDK.SetCurrentFrame(int animationId, int frameId);

SetCurrentFrameName

Set the current frame of the animation referenced by name.

UnityNativeChromaSDK.SetCurrentFrameName(string path, int frameId);

SetCurrentFrameNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetCurrentFrameNameD(string path, double frameId);

SetDevice

Changes the deviceType and device of a Chroma animation. If the device is changed, the Chroma animation will be reset with 1 blank frame. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.SetDevice(int animationId, int deviceType, int device);

SetEffect

SetEffect will display the referenced effect id.

long result = UnityNativeChromaSDK.SetEffect(Guid effectId);

SetIdleAnimation

When the idle animation is used, the named animation will play when no other animations are playing. Reference the animation by id.

UnityNativeChromaSDK.SetIdleAnimation(int animationId);

SetIdleAnimationName

When the idle animation is used, the named animation will play when no other animations are playing. Reference the animation by name.

UnityNativeChromaSDK.SetIdleAnimationName(string path);

SetKeyColor

Set animation key to a static color for the given frame.

UnityNativeChromaSDK.SetKeyColor(int animationId, int frameId, int rzkey, int color);

SetKeyColorAllFrames

Set the key to the specified key color for all frames. Animation is referenced by id.

UnityNativeChromaSDK.SetKeyColorAllFrames(int animationId, int rzkey, int color);

SetKeyColorAllFramesName

Set the key to the specified key color for all frames. Animation is referenced by name.

UnityNativeChromaSDK.SetKeyColorAllFramesName(string path, int rzkey, int color);

SetKeyColorAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyColorAllFramesNameD(string path, double rzkey, double color);

SetKeyColorAllFramesRGB

Set the key to the specified key color for all frames. Animation is referenced by id.

UnityNativeChromaSDK.SetKeyColorAllFramesRGB(int animationId, int rzkey, int red, int green, int blue);

SetKeyColorAllFramesRGBName

Set the key to the specified key color for all frames. Animation is referenced by name.

UnityNativeChromaSDK.SetKeyColorAllFramesRGBName(string path, int rzkey, int red, int green, int blue);

SetKeyColorAllFramesRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyColorAllFramesRGBNameD(string path, double rzkey, double red, double green, double blue);

SetKeyColorName

Set animation key to a static color for the given frame.

UnityNativeChromaSDK.SetKeyColorName(string path, int frameId, int rzkey, int color);

SetKeyColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyColorNameD(string path, double frameId, double rzkey, double color);

SetKeyColorRGB

Set the key to the specified key color for the specified frame. Animation is referenced by id.

UnityNativeChromaSDK.SetKeyColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue);

SetKeyColorRGBName

Set the key to the specified key color for the specified frame. Animation is referenced by name.

UnityNativeChromaSDK.SetKeyColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue);

SetKeyColorRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue);

SetKeyNonZeroColor

Set animation key to a static color for the given frame if the existing color is not already black.

UnityNativeChromaSDK.SetKeyNonZeroColor(int animationId, int frameId, int rzkey, int color);

SetKeyNonZeroColorName

Set animation key to a static color for the given frame if the existing color is not already black.

UnityNativeChromaSDK.SetKeyNonZeroColorName(string path, int frameId, int rzkey, int color);

SetKeyNonZeroColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyNonZeroColorNameD(string path, double frameId, double rzkey, double color);

SetKeyNonZeroColorRGB

Set the key to the specified key color for the specified frame where color is not black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeyNonZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue);

SetKeyNonZeroColorRGBName

Set the key to the specified key color for the specified frame where color is not black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeyNonZeroColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue);

SetKeyNonZeroColorRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyNonZeroColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue);

SetKeysColor

Set an array of animation keys to a static color for the given frame. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color);

SetKeysColorAllFrames

Set an array of animation keys to a static color for all frames. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color);

SetKeysColorAllFramesName

Set an array of animation keys to a static color for all frames. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysColorAllFramesName(string path, int[] rzkeys, int keyCount, int color);

SetKeysColorAllFramesRGB

Set an array of animation keys to a static color for all frames. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysColorAllFramesRGBName

Set an array of animation keys to a static color for all frames. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysColorAllFramesRGBName(string path, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysColorName

Set an array of animation keys to a static color for the given frame.

UnityNativeChromaSDK.SetKeysColorName(string path, int frameId, int[] rzkeys, int keyCount, int color);

SetKeysColorRGB

Set an array of animation keys to a static color for the given frame. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysColorRGBName

Set an array of animation keys to a static color for the given frame. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysNonZeroColor

Set an array of animation keys to a static color for the given frame if the existing color is not already black.

UnityNativeChromaSDK.SetKeysNonZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color);

SetKeysNonZeroColorAllFrames

Set an array of animation keys to a static color for the given frame where the color is not black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysNonZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color);

SetKeysNonZeroColorAllFramesName

Set an array of animation keys to a static color for all frames if the existing color is not already black. Reference animation by name.

UnityNativeChromaSDK.SetKeysNonZeroColorAllFramesName(string path, int[] rzkeys, int keyCount, int color);

SetKeysNonZeroColorName

Set an array of animation keys to a static color for the given frame if the existing color is not already black. Reference animation by name.

UnityNativeChromaSDK.SetKeysNonZeroColorName(string path, int frameId, int[] rzkeys, int keyCount, int color);

SetKeysNonZeroColorRGB

Set an array of animation keys to a static color for the given frame where the color is not black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysNonZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysNonZeroColorRGBName

Set an array of animation keys to a static color for the given frame where the color is not black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysNonZeroColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysZeroColor

Set an array of animation keys to a static color for the given frame where the color is black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysZeroColor(int animationId, int frameId, int[] rzkeys, int keyCount, int color);

SetKeysZeroColorAllFrames

Set an array of animation keys to a static color for all frames where the color is black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysZeroColorAllFrames(int animationId, int[] rzkeys, int keyCount, int color);

SetKeysZeroColorAllFramesName

Set an array of animation keys to a static color for all frames where the color is black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysZeroColorAllFramesName(string path, int[] rzkeys, int keyCount, int color);

SetKeysZeroColorAllFramesRGB

Set an array of animation keys to a static color for all frames where the color is black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysZeroColorAllFramesRGB(int animationId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysZeroColorAllFramesRGBName

Set an array of animation keys to a static color for all frames where the color is black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysZeroColorAllFramesRGBName(string path, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysZeroColorName

Set an array of animation keys to a static color for the given frame where the color is black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysZeroColorName(string path, int frameId, int[] rzkeys, int keyCount, int color);

SetKeysZeroColorRGB

Set an array of animation keys to a static color for the given frame where the color is black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeysZeroColorRGB(int animationId, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeysZeroColorRGBName

Set an array of animation keys to a static color for the given frame where the color is black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeysZeroColorRGBName(string path, int frameId, int[] rzkeys, int keyCount, int red, int green, int blue);

SetKeyZeroColor

Set animation key to a static color for the given frame where the color is black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeyZeroColor(int animationId, int frameId, int rzkey, int color);

SetKeyZeroColorName

Set animation key to a static color for the given frame where the color is black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeyZeroColorName(string path, int frameId, int rzkey, int color);

SetKeyZeroColorNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyZeroColorNameD(string path, double frameId, double rzkey, double color);

SetKeyZeroColorRGB

Set animation key to a static color for the given frame where the color is black. Animation is referenced by id.

UnityNativeChromaSDK.SetKeyZeroColorRGB(int animationId, int frameId, int rzkey, int red, int green, int blue);

SetKeyZeroColorRGBName

Set animation key to a static color for the given frame where the color is black. Animation is referenced by name.

UnityNativeChromaSDK.SetKeyZeroColorRGBName(string path, int frameId, int rzkey, int red, int green, int blue);

SetKeyZeroColorRGBNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SetKeyZeroColorRGBNameD(string path, double frameId, double rzkey, double red, double green, double blue);

SetLogDelegate

Invokes the setup for a debug logging callback so that stdout is redirected to the callback. This is used by Unity so that debug messages can appear in the console window.

UnityNativeChromaSDK.SetLogDelegate(IntPtr fp);

StaticColor

PluginStaticColor sets the target device to the static color.

UnityNativeChromaSDK.StaticColor(int deviceType, int device, int color);

StaticColorD

D suffix for limited data types.

double result = UnityNativeChromaSDK.StaticColorD(double deviceType, double device, double color);

StopAll

PluginStopAll will automatically stop all animations that are playing.

UnityNativeChromaSDK.StopAll();

StopAnimation

Stops animation playback if in progress. Returns the animation id upon success. Returns -1 upon failure.

int result = UnityNativeChromaSDK.StopAnimation(int animationId);

StopAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.StopAnimationD(double animationId);

StopAnimationName

PluginStopAnimationName automatically handles initializing the ChromaSDK. The named .chroma animation file will be automatically opened. The animation will stop if playing.

UnityNativeChromaSDK.StopAnimationName(string path);

StopAnimationNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.StopAnimationNameD(string path);

StopAnimationType

PluginStopAnimationType automatically handles initializing the ChromaSDK. If any animation is playing for the deviceType and device combination, it will be stopped.

UnityNativeChromaSDK.StopAnimationType(int deviceType, int device);

StopAnimationTypeD

D suffix for limited data types.

double result = UnityNativeChromaSDK.StopAnimationTypeD(double deviceType, double device);

StopComposite

PluginStopComposite automatically handles initializing the ChromaSDK. The named animation files for the .chroma set will be automatically opened. The set of animations will be stopped if playing.

UnityNativeChromaSDK.StopComposite(string name);

StopCompositeD

D suffix for limited data types.

double result = UnityNativeChromaSDK.StopCompositeD(string name);

SubtractNonZeroAllKeysAllFrames

Subtract the source color from the target color for all frames where the target color is not black. Source and target are referenced by id.

UnityNativeChromaSDK.SubtractNonZeroAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

SubtractNonZeroAllKeysAllFramesName

Subtract the source color from the target color for all frames where the target color is not black. Source and target are referenced by name.

UnityNativeChromaSDK.SubtractNonZeroAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

SubtractNonZeroAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SubtractNonZeroAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

SubtractNonZeroAllKeysAllFramesOffset

Subtract the source color from the target color for all frames where the target color is not black starting at offset for the length of the source. Source and target are referenced by id.

UnityNativeChromaSDK.SubtractNonZeroAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

SubtractNonZeroAllKeysAllFramesOffsetName

Subtract the source color from the target color for all frames where the target color is not black starting at offset for the length of the source. Source and target are referenced by name.

UnityNativeChromaSDK.SubtractNonZeroAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

SubtractNonZeroAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SubtractNonZeroAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

SubtractNonZeroAllKeysOffset

Subtract the source color from the target where color is not black for the source frame and target offset frame, reference source and target by id.

UnityNativeChromaSDK.SubtractNonZeroAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset);

SubtractNonZeroAllKeysOffsetName

Subtract the source color from the target where color is not black for the source frame and target offset frame, reference source and target by name.

UnityNativeChromaSDK.SubtractNonZeroAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset);

SubtractNonZeroAllKeysOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SubtractNonZeroAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset);

SubtractNonZeroTargetAllKeysAllFrames

Subtract the source color from the target color where the target color is not black for all frames. Reference source and target by id.

UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysAllFrames(int sourceAnimationId, int targetAnimationId);

SubtractNonZeroTargetAllKeysAllFramesName

Subtract the source color from the target color where the target color is not black for all frames. Reference source and target by name.

UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysAllFramesName(string sourceAnimation, string targetAnimation);

SubtractNonZeroTargetAllKeysAllFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysAllFramesNameD(string sourceAnimation, string targetAnimation);

SubtractNonZeroTargetAllKeysAllFramesOffset

Subtract the source color from the target color where the target color is not black for all frames starting at the target offset for the length of the source. Reference source and target by id.

UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysAllFramesOffset(int sourceAnimationId, int targetAnimationId, int offset);

SubtractNonZeroTargetAllKeysAllFramesOffsetName

Subtract the source color from the target color where the target color is not black for all frames starting at the target offset for the length of the source. Reference source and target by name.

UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysAllFramesOffsetName(string sourceAnimation, string targetAnimation, int offset);

SubtractNonZeroTargetAllKeysAllFramesOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysAllFramesOffsetNameD(string sourceAnimation, string targetAnimation, double offset);

SubtractNonZeroTargetAllKeysOffset

Subtract the source color from the target color where the target color is not black from the source frame to the target offset frame. Reference source and target by id.

UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysOffset(int sourceAnimationId, int targetAnimationId, int frameId, int offset);

SubtractNonZeroTargetAllKeysOffsetName

Subtract the source color from the target color where the target color is not black from the source frame to the target offset frame. Reference source and target by name.

UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysOffsetName(string sourceAnimation, string targetAnimation, int frameId, int offset);

SubtractNonZeroTargetAllKeysOffsetNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.SubtractNonZeroTargetAllKeysOffsetNameD(string sourceAnimation, string targetAnimation, double frameId, double offset);

TrimEndFrames

Trim the end of the animation. The length of the animation will be the lastFrameId

    1. Reference the animation by id.
UnityNativeChromaSDK.TrimEndFrames(int animationId, int lastFrameId);

TrimEndFramesName

Trim the end of the animation. The length of the animation will be the lastFrameId

    1. Reference the animation by name.
UnityNativeChromaSDK.TrimEndFramesName(string path, int lastFrameId);

TrimEndFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.TrimEndFramesNameD(string path, double lastFrameId);

TrimFrame

Remove the frame from the animation. Reference animation by id.

UnityNativeChromaSDK.TrimFrame(int animationId, int frameId);

TrimFrameName

Remove the frame from the animation. Reference animation by name.

UnityNativeChromaSDK.TrimFrameName(string path, int frameId);

TrimFrameNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.TrimFrameNameD(string path, double frameId);

TrimStartFrames

Trim the start of the animation starting at frame 0 for the number of frames. Reference the animation by id.

UnityNativeChromaSDK.TrimStartFrames(int animationId, int numberOfFrames);

TrimStartFramesName

Trim the start of the animation starting at frame 0 for the number of frames. Reference the animation by name.

UnityNativeChromaSDK.TrimStartFramesName(string path, int numberOfFrames);

TrimStartFramesNameD

D suffix for limited data types.

double result = UnityNativeChromaSDK.TrimStartFramesNameD(string path, double numberOfFrames);

Uninit

Uninitializes the ChromaSDK. Returns 0 upon success. Returns -1 upon failure.

long result = UnityNativeChromaSDK.Uninit();

UninitD

D suffix for limited data types.

double result = UnityNativeChromaSDK.UninitD();

UnloadAnimation

Unloads Chroma effects to free up resources. Returns the animation id upon success. Returns -1 upon failure. Reference the animation by id.

int result = UnityNativeChromaSDK.UnloadAnimation(int animationId);

UnloadAnimationD

D suffix for limited data types.

double result = UnityNativeChromaSDK.UnloadAnimationD(double animationId);

UnloadAnimationName

Unload the animation effects. Reference the animation by name.

UnityNativeChromaSDK.UnloadAnimationName(string path);

UnloadComposite

Unload the the composite set of animation effects. Reference the animation by name.

UnityNativeChromaSDK.UnloadComposite(string name);

UpdateFrame

Updates the frameIndex of the Chroma animation and sets the duration (in seconds). The color is expected to be an array of the dimensions for the deviceType/device. The length parameter is the size of the color array. For EChromaSDKDevice1DEnum the array size should be MAX LEDS. For EChromaSDKDevice2DEnum the array size should be MAX ROW

  • MAX COLUMN. Returns the animation id upon success. Returns -1 upon failure.
int result = UnityNativeChromaSDK.UpdateFrame(int animationId, int frameIndex, float duration, int[] colors, int length);

UseIdleAnimation

When the idle animation flag is true, when no other animations are playing, the idle animation will be used. The idle animation will not be affected by the API calls to PluginIsPlaying, PluginStopAnimationType, PluginGetPlayingAnimationId, and PluginGetPlayingAnimationCount. Then the idle animation flag is false, the idle animation is disabled. Device uses EChromaSDKDeviceEnum enums.

UnityNativeChromaSDK.UseIdleAnimation(int device, bool flag);

UseIdleAnimations

Set idle animation flag for all devices.

UnityNativeChromaSDK.UseIdleAnimations(bool flag);

UsePreloading

Set preloading animation flag, which is set to true by default. Reference animation by id.

UnityNativeChromaSDK.UsePreloading(int animationId, bool flag);

UsePreloadingName

Set preloading animation flag, which is set to true by default. Reference animation by name.

UnityNativeChromaSDK.UsePreloadingName(string path, bool flag);

Examples

Example01

UnityNativeChromaSDKExample01.cs has a GUI example to play/stop/edit Chroma animations at runtime.

image_3

Example02

UnityNativeChromaSDKExample02.cs has a GUI button to load scene 1 to show animations work with multiple scenes.

image_4

UnityNativeChromaSDKPlayOnEnable

The UnityNativeChromaSDKPlayOnEnable.cs script will automatically open and play a Chroma animation by name.

The AnimationName field references a .chroma asset filename from the StreamingAssets folder.

The .chroma extension on the AnimationName field is optional.

The UnityNativeChromaSDKPlayOnEnable.cs script will play the animation when the OnEnable event fires.

The UnityNativeChromaSDKPlayOnEnable.cs script will stop the animation when the OnDisable event fires.

image_5

Example03

Particle capture example

Example04

Show PlayOnEnable script

Example05

Image plane capture example

Example06

Show PlayAndDeactivate script

Example07

Show PlayOnDestroy script

Example08

SetKeys and CopyKeys can be used to highlight keys on top of an animated base layer.

Example09

Chroma animations can be paused and resumed with looping ON or OFF.

Example10

Chroma animations support independent layering.

About

[Deprecated] Control Chroma Lighting with the Unity Native Chroma Plugin

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages