This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Notice
This set of functions is available when the FMOD plugin is loaded.

An instance of an FMOD Studio Event.

EventInstance Class

Members


void setPaused ( int paused ) #

Sets the pause state.

Arguments

  • int paused - 1 to pause the event instance, 0 to unpause it.

int isPaused ( ) #

Returns the pause state.

Return value

1 if the event instance is paused, otherwise, 0.

void setPitch ( float pitch ) #

Sets the pitch multiplier.

Arguments

  • float pitch - Pitch multiplier. Range: [0; inf]. Default: 1. The pitch multiplier can be set to any value greater than or equal to zero but the final combined pitch is clamped to the range [0; 100] before being applied.

float getPitch ( ) #

Returns the current pitch multiplier.

Return value

Pitch multiplier.

void setGain ( float gain ) #

Sets the gain value.

Arguments

  • float gain - Gain value to be set.

float getGain ( ) #

Returns the current gain value.

Return value

Gain value.

void setMaxDistance ( float distance ) #

Sets the maximum distance for 3D attenuation.

Arguments

  • float distance - Maximum distance, in distance units.

float getMaxDistance ( ) #

Returns the current maximum distance for 3D attenuation.

Return value

Maximum distance, in distance units.

void setMinDistance ( float distance ) #

Sets the minimum distance for 3D attenuation.

Arguments

  • float distance - Minimum distance, in distance units.

float getMinDistance ( ) #

Returns the current minimum distance for 3D attenuation.

Return value

Minimum distance, in distance units.

void setTimeLinePosition ( int position ) #

Sets the timeline cursor position.

Arguments

  • int position - Timeline position, in milliseconds. Range: [0; inf].

int getTimeLinePosition ( ) #

Returns the current timeline cursor position.

Return value

Timeline position, in milliseconds.

void set3DAttributes ( const Vec3 & position, const Vec3 & up, const Vec3 & forward, const Vec3 & velocity ) #

Sets event's position, velocity and orientation used to calculate 3D panning, doppler and the values of automatic distance and angle parameters.

Arguments

  • const Vec3 & position - Position in world space used for panning and attenuation.
  • const Vec3 & up - Upwards orientation, must be of unit length (1.0) and perpendicular to forward.
  • const Vec3 & forward - Forwards orientation, must be of unit length (1.0) and perpendicular to up.
  • const Vec3 & velocity - Velocity in world space used for doppler, in distance units per second.

void get3DAttributes ( Vec3 & position, Vec3 & up, Vec3 & forward, Vec3 & velocity ) #

Returns event's position, velocity and orientation.

Arguments

  • Vec3 & position - Position in world space.
  • Vec3 & up - Upwards orientation.
  • Vec3 & forward - Forwards orientation.
  • Vec3 & velocity - Velocity in world space.

void setVelocity ( const Vec3 & velocity ) #

Sets event's velocity.

Arguments

  • const Vec3 & velocity - Velocity in world space, in distance units per second.

int isVirtual ( ) #

Returns a value indicating whether an event instance has been virtualized due to the polyphony limit being exceeded.

Return value

1 if the event instance has been virtualized, otherwise, 0.

int isStarting ( ) #

Returns a value indicating whether an event instance is preparing to start.

Return value

1 if the event instance is preparing to start, otherwise, 0.

int isStopping ( ) #

Returns a value indicating whether an event instance is preparing to stop.

Return value

1 if the event instance is preparing to stop, otherwise, 0.

int isStopped ( ) #

Returns a value indicating whether an event instance is stopped.

Return value

1 if the event instance is stopped, otherwise, 0.

int isSustaining ( ) #

Returns a value indicating whether the timeline cursor is paused on a sustain point.

Return value

1 if the timeline cursor is paused on a sustain point, otherwise, 0.

int isPlaying ( ) #

Returns a value indicating whether an event instance is playing.

Return value

1 if the event instance is playing, otherwise, 0.

void play ( ) #

Starts playback. If the instance was already playing then calling this function will restart the event.

void stop ( ) #

Stops playback.

void release ( ) #

Marks the event instance for release. Event instances marked for release are destroyed by the asynchronous update when they are in the stopped state.

void update ( ) #

Updates the position of the event instance in world space.

void setParameter ( string name, float value ) #

Sets a parameter value by name.

Arguments

  • string name - Parameter name (case-insensitive) of an FMOD Studio event. (UTF-8 string)
  • float value - Value for a given name.

float getParameter ( string name ) #

Returns a parameter value by name.

Arguments

  • string name - Parameter name (case-insensitive). (UTF-8 string)

Return value

Value for a given name.

void setTransform ( Mat4 transform ) #

Sets the transformation matrix for the node in world coordinates.

Arguments

  • Mat4 transform - New transformation matrix to be set for the node (world coordinates).

void setParent ( Node parent ) #

Sets a new parent for the node. Transformations of the current node will be done in the coordinates of the parent.

Arguments

  • Node parent - New parent node.

void releaseFromDefinition ( ) #

Auxiliary function, not to be used.
Last update: 2021-12-13
Build: ()