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
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.

ParticleModifier Class

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.

This is a base class for particle system modifiers. These modifiers are used to control how various parameters of particle systems (such as direction, radius, positions, etc.) change over the particle's lifetime.

There are two types of modifiers available:

  • Scalar - used for scalar parameters (radius, velocity, etc.). The majority of particle system modifiers belong to this type.
  • Vector - used for vector parameters (direction, position, etc.)

ParticleModifier Class

Members


int isSignedValues ( ) #

Returns a value indicating whether the value(s) controlled by the modifier are signed or unsigned.

Return value

1 is the value(s) controlled by the modifier are signed; otherwise, 0.

int saveState ( Stream stream ) #

Saves the current modifier state to the specified stream.

Saving into the stream requires creating a blob to save into. To restore the saved state the restoreState() method is used:

Source code (UnigineScript)
// initialize a node and set its state
//...//

// save state
Blob blob_state = new Blob();
particlemodifier.saveState(blob_state);

// change state
//...//

// restore state
blob_state.seekSet(0); // returning the carriage to the start of the blob
particlemodifier.restoreState(blob_state);

Arguments

  • Stream stream - Stream to which the modifier's state is to be saved.

Return value

1 if the state is saved successfully; otherwise, 0.

int restoreState ( const Stream stream ) #

Restores a previously saved state from the specified stream.

Restoring from the stream requires creating a blob to save into and saving the state using the saveState() method:

Source code (UnigineScript)
// initialize a node and set its state
//...//

// save state
Blob blob_state = new Blob();
particlemodifier.saveState(blob_state);

// change state
//...//

// restore state
blob_state.seekSet(0); // returning the carriage to the start of the blob
particlemodifier.restoreState(blob_state);

Arguments

  • const Stream stream - Stream from which the modifier's state is to be loaded.

Return value

1 if the state is restored successfully; otherwise, 0.

int save ( Xml xml ) #

Saves the modifier's state to the specified Xml node.

Arguments

  • Xml xml - Xml node to which the modifier's state is to be saved.

Return value

1 if the state is saved successfully; otherwise, 0.

int load ( const Xml xml ) #

Loads a previously saved modifier's state from the specified Xml node.

Arguments

  • const Xml xml - Xml node from which the modifier's state is to be loaded.

Return value

1 if the state is loaded successfully; otherwise, 0.

long getSystemMemoryUsage ( ) #

Returns the total amount of memory used by the modifier.

Return value

Total amount of memory used by the modifier with all its keys, in bytes.

int getType ( ) #

Returns the type of the particle modifier.

Return value

Particle modifier type. One of the PARTICLE_MODIFIER_PARTICLE_MODIFIER_* values.

void setMode ( int mode ) #

Sets the mode of the particle modifier. The mode defines how the controlled value is set. You can switch modes at any time.

Arguments

int getMode ( ) #

Returns the current mode of the particle modifier. The mode defines how the controlled value is set. You can switch modes at any time.

Return value

Current particle modifier mode. One of the PARTICLE_MODIFIER_MODE_* values.
Last update: 2021-12-13
Build: ()