Particle Playground - Script Reference  3.0.1
Framework for controlling particles in the Unity Engine.
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
ParticlePlayground.PlaygroundC Class Reference

The PlaygroundC class is the Playground Manager which runs all Particle Playground systems and is containing all Global Manipulators. The Playground Manager acts as a wrapper class for common operations and contain functions for creating and altering particle systems. You will also find the global event delegates (particleEventBirth, particleEventDeath, particleEventCollision and particleEventTime) for any particle systems broadcasting events with "Send To Manager" enabled. More...

Inheritance diagram for ParticlePlayground.PlaygroundC:

Public Member Functions

bool IsDoneThread ()
 Determines whether the thread for threadMethod if set to ThreadMethod.OneForAll is finished. This is always true when any other method is selected. More...
 
bool IsDoneThreadTurbulence ()
 Determines whether the thread for turbulence is done. More...
 
bool IsDoneThreadSkinnedMeshes ()
 Determines whether the thread for skinned meshes is done. More...
 
bool IsFirstUnsafeAutomaticFrames ()
 Determines whether the multithreading is within the initial first unsafe frames. More...
 
bool HasEnabledGlobalManipulators ()
 Determines whether there is enabled global manipulators which should be calculated. More...
 
IEnumerator InitializePlayground ()
 Initializes the Playground Manager. More...
 

Static Public Member Functions

static void SendParticleEventBirth (PlaygroundEventParticle eventParticle)
 Sends the particle event birth. More...
 
static void SendParticleEventDeath (PlaygroundEventParticle eventParticle)
 Sends the particle event death. More...
 
static void SendParticleEventCollision (PlaygroundEventParticle eventParticle)
 Sends the particle event collision. More...
 
static void SendParticleEventTime (PlaygroundEventParticle eventParticle)
 Sends the particle event time. More...
 
static PlaygroundParticlesC Particle ()
 Creates a PlaygroundParticlesC object by standard prefab More...
 
static PlaygroundParticlesC ParticleNew ()
 Creates an empty PlaygroundParticlesC object by script More...
 
static PlaygroundParticlesC Particle (Texture2D image, string name, Vector3 position, Quaternion rotation, Vector3 offset, float particleSize, float scale, Material material)
 Creates a PlaygroundParticlesC object with an image state. More...
 
static PlaygroundParticlesC Particle (Texture2D image)
 Creates a PlaygroundParticlesC object with an image state. More...
 
static PlaygroundParticlesC Particle (Texture2D[] images, string name, Vector3 position, Quaternion rotation, Vector3 offset, float particleSize, float scale, Material material)
 Creates a PlaygroundParticlesC object with several image states. More...
 
static PlaygroundParticlesC Particle (Texture2D[] images)
 Creates a PlaygroundParticlesC object with several image states. More...
 
static PlaygroundParticlesC Particle (Mesh mesh, Texture2D texture, string name, Vector3 position, Quaternion rotation, float particleScale, Vector3 offset, Material material)
 Creates a PlaygroundParticlesC object with a mesh state. More...
 
static PlaygroundParticlesC Particle (Mesh mesh, Texture2D texture)
 Creates a PlaygroundParticlesC object with a mesh state. More...
 
static PlaygroundParticlesC Particle (Mesh[] meshes, Texture2D[] textures, string name, Vector3 position, Quaternion rotation, float particleScale, Vector3[] offsets, Material material)
 Creates a PlaygroundParticlesC object with several mesh states. More...
 
static PlaygroundParticlesC Particle (Mesh[] meshes, Texture2D[] textures)
 Creates a PlaygroundParticlesC object with several mesh states. More...
 
static int Emit (PlaygroundParticlesC playgroundParticles)
 Emits next particle - using the particle system as a pool (note that you need to set scriptedEmission-variables on beforehand using this method). Returns emitted particle number. More...
 
static int Emit (PlaygroundParticlesC playgroundParticles, Vector3 position, Vector3 normal, Color color)
 Emits next particle while setting scriptedEmission data - using the particle system as a pool. Returns emitted particle number. More...
 
static void Emit (PlaygroundParticlesC playgroundParticles, bool setEmission)
 Sets emission on/off. More...
 
static void GetPosition (SkinnedWorldObject particleStateWorldObject, bool updateNormals)
 Gets vertices and normals from a skinned world object in Vector3[] format (notice that the array is modified by reference). More...
 
static void GetPosition (Vector3[] vertices, WorldObject particleStateWorldObject)
 Gets vertices from a world object in Vector3[] format (notice that the array is modified by reference). More...
 
static void GetNormals (Vector3[] normals, WorldObject particleStateWorldObject)
 Gets normals from a world object in Vector3[] format (notice that the array is modified by reference). More...
 
static void SetAlpha (PlaygroundParticlesC playgroundParticles, float alpha)
 Sets alpha of particles instantly. More...
 
static void SetSize (PlaygroundParticlesC playgroundParticles, float size)
 Sets particle size. More...
 
static void Translate (PlaygroundParticlesC playgroundParticles, Vector3 direction)
 Translates all particles in Particle System. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, ParticleStateC state)
 Adds a single state. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Texture2D image, float scale, Vector3 offset, string stateName)
 Adds a single state image. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Texture2D image, float scale, Vector3 offset, string stateName, Transform stateTransform)
 Adds a single state image with transform. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Texture2D image, Texture2D depthmap, float depthmapStrength, float scale, Vector3 offset, string stateName)
 Adds a single state image with depthmap. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Texture2D image, Texture2D depthmap, float depthmapStrength, float scale, Vector3 offset, string stateName, Transform stateTransform)
 Adds single state image with depthmap and transform. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Mesh mesh, float scale, Vector3 offset, string stateName)
 Adds a single state mesh. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Mesh mesh, float scale, Vector3 offset, string stateName, Transform stateTransform)
 Adds a single state mesh with transform. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Mesh mesh, Texture2D texture, float scale, Vector3 offset, string stateName)
 Adds a single state mesh with texture. More...
 
static void Add (PlaygroundParticlesC playgroundParticles, Mesh mesh, Texture2D texture, float scale, Vector3 offset, string stateName, Transform stateTransform)
 Adds a single state mesh with texture and transform. More...
 
static PlaygroundColliderC AddCollider (PlaygroundParticlesC playgroundParticles)
 Adds a plane collider. More...
 
static PlaygroundColliderC AddCollider (PlaygroundParticlesC playgroundParticles, Transform transform)
 Adds a plane collider and assign a transform. More...
 
static void SetParticleCount (PlaygroundParticlesC playgroundParticles, int amount)
 Sets amount of particles for this Particle System. More...
 
static void SetLifetime (PlaygroundParticlesC playgroundParticles, float time)
 Sets lifetime for this Particle System. More...
 
static void SetMaterial (PlaygroundParticlesC playgroundParticles, Material particleMaterial)
 Sets material for this Particle System. More...
 
static void Destroy (PlaygroundParticlesC playgroundParticles)
 Destroys the passed in Particle System. More...
 
static WorldObject WorldObject (Transform meshTransform)
 Creates a world object reference (used for live world positioning of particles towards a mesh). More...
 
static SkinnedWorldObject SkinnedWorldObject (Transform meshTransform)
 Creates a skinned world object reference (used for live world positioning of particles towards a mesh). More...
 
static ManipulatorObjectC ManipulatorObject (MANIPULATORTYPEC type, LayerMask affects, Transform manipulatorTransform, float size, float strength)
 Creates a manipulator object. More...
 
static ManipulatorObjectC ManipulatorObject (Transform manipulatorTransform)
 Creates a manipulator object by transform. More...
 
static ManipulatorObjectC ManipulatorObject (MANIPULATORTYPEC type, LayerMask affects, Transform manipulatorTransform, float size, float strength, PlaygroundParticlesC playgroundParticles)
 Create a manipulator in a PlaygroundParticlesC object More...
 
static ManipulatorObjectC ManipulatorObject (Transform manipulatorTransform, PlaygroundParticlesC playgroundParticles)
 Creates a manipulator in a PlaygroundParticlesC object by transform. More...
 
static ManipulatorObjectC GetManipulator (int i)
 Returns a global manipulator in array position. More...
 
static ManipulatorObjectC GetManipulator (int i, PlaygroundParticlesC playgroundParticles)
 Returns a manipulator in a PlaygroundParticlesC object in array position. More...
 
static List
< PlaygroundEventParticle
GetManipulatorParticles (int manipulator, PlaygroundParticlesC playgroundParticles)
 Returns all current particles within a local manipulator (in form of an Event Particle, however no event will be needed). More...
 
static List
< PlaygroundEventParticle
GetManipulatorParticles (int manipulator)
 Returns all current particles within a global manipulator (in form of an Event Particle, however no event will be needed). More...
 
static Transform CreateTransform ()
 
static Transform CreatePlaygroundTransform (PlaygroundParticlesC playgroundParticles)
 
static PlaygroundSpline CreateSpline ()
 Creates a new Playground Spline. The spline will be attached to a new GameObject in your scene by the name "Playground Spline". More...
 
static PlaygroundSpline CreateSpline (PlaygroundParticlesC playgroundParticles)
 Creates a new Playground Spline. The spline will be attached to a new GameObject in your scene by the name "Playground Spline" which is parented to the passed in Particle Playground system. The Particle Playground system will have the source spline automatically set. More...
 
static PlaygroundSpline CreateSpline (ManipulatorPropertyC manipulatorProperty)
 
static PlaygroundEventC CreateEvent ()
 Creates an empty event. More...
 
static PlaygroundEventC CreateEvent (PlaygroundParticlesC playgroundParticles)
 Creates an event into passed particle system. More...
 
static PlaygroundEventC GetEvent (int i, PlaygroundParticlesC playgroundParticles)
 Returns an event from PlaygroundParticlesC object in array position. More...
 
static void RemoveEvent (int i, PlaygroundParticlesC playgroundParticles)
 Removes the event. More...
 
static PlaygroundParticlesC GetParticles (int i)
 Returns a Particle Playground System in array position. More...
 
static ParticleProjectionC ParticleProjection (PlaygroundParticlesC playgroundParticles)
 Creates a projection object reference. More...
 
static PaintObjectC PaintObject (PlaygroundParticlesC playgroundParticles)
 Creates a paint object reference. More...
 
static int Paint (PlaygroundParticlesC playgroundParticles, Vector3 position, Vector3 normal, Transform parent, Color32 color)
 Live paints into a PlaygroundParticlesC PaintObject's positions. More...
 
static void Paint (PaintObjectC paintObject, Vector3 position, Vector3 normal, Transform parent, Color32 color)
 Live paints into a PaintObject's positions directly. More...
 
static bool Erase (PlaygroundParticlesC playgroundParticles, Vector3 position, float radius)
 Live erases into a PlaygroundParticlesC PaintObject's positions, returns true if position was erased. More...
 
static bool Erase (PaintObjectC paintObject, Vector3 position, float radius)
 Live erases into a PaintObject's positions directly, returns true if position was erased. More...
 
static bool Erase (PlaygroundParticlesC playgroundParticles, int index)
 Live erases into a PlaygroundParticlesC PaintObject's using a specified index, returns true if position was erased. More...
 
static void ClearPaint (PlaygroundParticlesC playgroundParticles)
 Clears out paint in a PlaygroundParticlesC object. More...
 
static int GetPaintPositionLength (PlaygroundParticlesC playgroundParticles)
 Gets the amount of paint positions in this PlaygroundParticlesC PaintObject. More...
 
static void SetInitialTargetPosition (PlaygroundParticlesC playgroundParticles, Vector3 position)
 Sets initial target position for this Particle System. More...
 
static void Emission (PlaygroundParticlesC playgroundParticles, bool emit)
 Sets emission for this Particle System. More...
 
static void Emission (PlaygroundParticlesC playgroundParticles, bool emit, bool restEmission)
 Set emission for this Particle System controlling to run rest emission More...
 
static void Clear (PlaygroundParticlesC playgroundParticles)
 Clears out this Particle System. More...
 
static void RefreshScatter (PlaygroundParticlesC playgroundParticles)
 Refreshes source scatter for this Particle System. More...
 
static PlaygroundParticlesC InstantiatePreset (string presetName)
 Instantiates a preset by name reference. Any preset you wish to instantiate using the InstantiatePreset method needs to be in a 'Resources/Presets/' folder. More...
 
static PlaygroundParticlesC InstantiatePreset (string categoryName, string presetName)
 Instantiates a preset by category and name reference. The category is the name of the folder. Any preset you wish to instantiate using this InstantiatePreset overload needs to be in a 'Resources/Presets/categoryName/' folder. More...
 
static bool HasReference ()
 Determines if the Playground Manager has its reference assigned. More...
 
static bool HasPlaygroundPool ()
 Determines if the Playground Manager has a Playground Pool assigned. More...
 
static Color32[] GetPixels (Texture2D image)
 Returns pixels from a texture. More...
 
static Vector3 Offset (PLAYGROUNDORIGINC origin, int imageWidth, int imageHeight, float meshScale)
 
static Vector3[] RandomVector3 (int length, Vector3 min, Vector3 max)
 Returns a random vector3-array. More...
 
static float[] RandomFloat (int length, float min, float max)
 Returns a float array by random values. More...
 
static void ShuffleArray (float[] arr)
 Shuffles an existing built-in float array. More...
 
static void ShuffleArray (int[] arr)
 Shuffles an existing built-in int array. More...
 
static int Largest (int[] compare)
 Compares and returns the largest number in an int array. More...
 
static int CountZeroAlphasInTexture (Texture2D image)
 Counts the completely transparent pixels in a Texture2D. More...
 
static GameObject ResourceInstantiate (string n)
 Instantiates from Resources. More...
 
static void TimeReset ()
 Reset time More...
 
static bool IsReady ()
 
static void SetTime ()
 Updates the global time. More...
 
static void SetMaxThreads (int threadCount)
 Sets the maximum threads allowed. When using Thread Pool Method: Playground Pool this will set the amount of reused threads. More...
 
static int ActiveThreads ()
 Returns the amount of current active threads created. More...
 
static int ProcessorCount ()
 
static void RunAsync (Action a, ThreadPoolMethod threadPoolMethod)
 Runs an action asynchrounously on a second thread. Use a lambda expression to pass data to another thread. More...
 
static void RunAsync (Action a)
 
static void RunAsyncPlaygroundPool (Action a)
 

Public Attributes

List< PlaygroundParticlesCparticleSystems = new List<PlaygroundParticlesC>()
 The particle systems controlled by this Playground Manager. More...
 
List< ManipulatorObjectCmanipulators = new List<ManipulatorObjectC>()
 The manipulators controlled by this Playground Manager. More...
 
int paintMaxPositions = 10000
 Maximum amount of emission positions in a PaintObject. More...
 
bool calculate = true
 Calculate forces on PlaygroundParticlesC objects. More...
 
PIXELMODEC pixelFilterMode = PIXELMODEC.Pixel32
 Color filtering mode. More...
 
bool autoGroup = true
 Automatically parent a PlaygroundParticlesC object to Playground if it has no parent. More...
 
bool buildZeroAlphaPixels = false
 Turn this on if you want to build particles from 0 alpha pixels into states. More...
 
bool drawGizmos = true
 Draw gizmos for manipulators and other particle system helpers in Scene View. More...
 
bool drawSourcePositions = false
 Draw gizmos for source positions in Scene View. More...
 
bool showShuriken = false
 Should the Shuriken particle system component be visible? (This is just a precaution as editing Shuriken can lead to unexpected behavior). More...
 
bool paintToolbox = true
 Show toolbox in Scene View when Source is set to Paint on PlaygroundParticlesC objects. More...
 
float collisionPlaneScale = .1f
 Scale of collision planes. More...
 
bool showSnapshotsInHierarchy = false
 Should snapshots be visible in the Hieararchy? (Enable this if you want to edit snapshots). More...
 
bool drawWireframe = false
 Should wireframes be rendered around particles in Scene View? More...
 
bool drawSplinePreview = true
 Determines to draw previews of Playground Splines in Scene View. More...
 
bool globalTimeScale = true
 Determines if Time.timeScale should affect the particle systems simulation time. If disabled you can keep simulating particles in normal speed detached from the scene's time scale. More...
 
ThreadPoolMethod threadPoolMethod = ThreadPoolMethod.PlaygroundPool
 The thread pool method determines which thread pooling should be used. ThreadPoolMethod.ThreadPool will use the .NET managed ThreadPool class (standard in Particle Playground in versions prior to 3). ThreadPoolMethod.PlaygroundPool will use the self-managed PlaygroundQueue which queues tasks on reused threads (standard in Particle Playground 3 and up). More...
 
ThreadMethod threadMethod = ThreadMethod.Automatic
 The multithreading method Particle Playground should use. This determines how particle systems calculate over the CPU. Keep in mind each thread will generate memory garbage which will be collected at some point. Selecting ThreadMethod.NoThreads will make particle systems calculate on the main-thread. ThreadMethod.OnePerSystem will create one thread per particle system each frame. ThreadMethod.OneForAll will bundle all calculations into one single thread. ThreadMethod.Automatic will distribute all particle systems evenly bundled along available CPUs/cores. This is the recommended setting for most user cases. More...
 
ThreadMethodComponent skinnedMeshThreadMethod = ThreadMethodComponent.InsideParticleCalculation
 
ThreadMethodComponent turbulenceThreadMethod = ThreadMethodComponent.InsideParticleCalculation
 
int maxThreads = 8
 The maximum amount of threads that can be created. The amount of created threads will never exceed available CPUs. More...
 

Static Public Attributes

static int meshQuantity
 
static int particlesQuantity
 
static float version = 3f
 
static string specialVersion = " "
 
static float globalTime
 The global time. More...
 
static float lastTimeUpdated
 Time when globalTime last updated. More...
 
static float globalDeltaTime
 Delta time for globalTime (globalTime-lastTimeUpdated). More...
 
static float globalTimescale = 1.0f
 Scaling of globalTime. More...
 
static Vector3 initialTargetPosition = new Vector3(0,-999.99f,0)
 Initial spawn position when particle is not set to rebirth. More...
 
static int skinnedUpdateRate = 1
 Update rate for finding vertices in skinned meshes (1 = Every frame, 2 = Every second frame...). More...
 
static bool triggerSceneRepaint = true
 Let a PlaygroundParticleWindow repaint the scene. More...
 
static float collisionSleepVelocity = .01f
 Minimum velocity of a particle before it goes to rest on collision. More...
 
static int unsafeAutomaticThreadFrames = 20
 Determines how many frames are unsafe before initiating automatic thread bundling. More...
 
static Plane[] frustumPlanes
 The frustum planes of the Main Camera. This is used to disable or enable calculation on particle systems when having PlaygroundParticlesC.pauseCalculationWhenInvisible enabled. More...
 
static PlaygroundC reference
 Static reference to the Playground Manager script. More...
 
static Transform referenceTransform
 Static reference to the Playground Manager Transform. More...
 
static GameObject referenceGameObject
 Static reference to the Playground Manager GameObject. More...
 
static PlaygroundQueue< Action > playgroundPool
 The Particle Playground-managed thread pool. The maxThreads value will determine how many threads will be available in the pool. More...
 

Events

static OnPlaygroundParticle particleEventBirth
 The event of a particle birthing. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager. More...
 
static OnPlaygroundParticle particleEventDeath
 The event of a particle dying. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager. More...
 
static OnPlaygroundParticle particleEventCollision
 The event of a particle colliding. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager. More...
 
static OnPlaygroundParticle particleEventTime
 The event of a particle sent by timer. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager. More...
 

Detailed Description

The PlaygroundC class is the Playground Manager which runs all Particle Playground systems and is containing all Global Manipulators. The Playground Manager acts as a wrapper class for common operations and contain functions for creating and altering particle systems. You will also find the global event delegates (particleEventBirth, particleEventDeath, particleEventCollision and particleEventTime) for any particle systems broadcasting events with "Send To Manager" enabled.

Member Function Documentation

static int ParticlePlayground.PlaygroundC.ActiveThreads ( )
static

Returns the amount of current active threads created.

Returns
The thread amount.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
ParticleStateC  state 
)
static

Adds a single state.

Parameters
playgroundParticlesPlayground particles.
stateState.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Texture2D  image,
float  scale,
Vector3  offset,
string  stateName 
)
static

Adds a single state image.

Parameters
playgroundParticlesPlayground particles.
imageImage.
scaleScale.
offsetOffset.
stateNameState name.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Texture2D  image,
float  scale,
Vector3  offset,
string  stateName,
Transform  stateTransform 
)
static

Adds a single state image with transform.

Parameters
playgroundParticlesPlayground particles.
imageImage.
scaleScale.
offsetOffset.
stateNameState name.
stateTransformState transform.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Texture2D  image,
Texture2D  depthmap,
float  depthmapStrength,
float  scale,
Vector3  offset,
string  stateName 
)
static

Adds a single state image with depthmap.

Parameters
playgroundParticlesPlayground particles.
imageImage.
depthmapDepthmap.
depthmapStrengthDepthmap strength.
scaleScale.
offsetOffset.
stateNameState name.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Texture2D  image,
Texture2D  depthmap,
float  depthmapStrength,
float  scale,
Vector3  offset,
string  stateName,
Transform  stateTransform 
)
static

Adds single state image with depthmap and transform.

Parameters
playgroundParticlesPlayground particles.
imageImage.
depthmapDepthmap.
depthmapStrengthDepthmap strength.
scaleScale.
offsetOffset.
stateNameState name.
stateTransformState transform.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Mesh  mesh,
float  scale,
Vector3  offset,
string  stateName 
)
static

Adds a single state mesh.

Parameters
playgroundParticlesPlayground particles.
meshMesh.
scaleScale.
offsetOffset.
stateNameState name.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Mesh  mesh,
float  scale,
Vector3  offset,
string  stateName,
Transform  stateTransform 
)
static

Adds a single state mesh with transform.

Parameters
playgroundParticlesPlayground particles.
meshMesh.
scaleScale.
offsetOffset.
stateNameState name.
stateTransformState transform.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Mesh  mesh,
Texture2D  texture,
float  scale,
Vector3  offset,
string  stateName 
)
static

Adds a single state mesh with texture.

Parameters
playgroundParticlesPlayground particles.
meshMesh.
textureTexture.
scaleScale.
offsetOffset.
stateNameState name.
static void ParticlePlayground.PlaygroundC.Add ( PlaygroundParticlesC  playgroundParticles,
Mesh  mesh,
Texture2D  texture,
float  scale,
Vector3  offset,
string  stateName,
Transform  stateTransform 
)
static

Adds a single state mesh with texture and transform.

Parameters
playgroundParticlesPlayground particles.
meshMesh.
textureTexture.
scaleScale.
offsetOffset.
stateNameState name.
stateTransformState transform.
static PlaygroundColliderC ParticlePlayground.PlaygroundC.AddCollider ( PlaygroundParticlesC  playgroundParticles)
static

Adds a plane collider.

Returns
The PlaygroundColliderC.
Parameters
playgroundParticlesPlayground particles.
static PlaygroundColliderC ParticlePlayground.PlaygroundC.AddCollider ( PlaygroundParticlesC  playgroundParticles,
Transform  transform 
)
static

Adds a plane collider and assign a transform.

Returns
The PlaygroundColliderC.
Parameters
playgroundParticlesPlayground particles.
transformTransform.
static void ParticlePlayground.PlaygroundC.Clear ( PlaygroundParticlesC  playgroundParticles)
static

Clears out this Particle System.

Parameters
playgroundParticlesPlayground particles.
static void ParticlePlayground.PlaygroundC.ClearPaint ( PlaygroundParticlesC  playgroundParticles)
static

Clears out paint in a PlaygroundParticlesC object.

Parameters
playgroundParticlesPlayground particles.
static int ParticlePlayground.PlaygroundC.CountZeroAlphasInTexture ( Texture2D  image)
static

Counts the completely transparent pixels in a Texture2D.

Returns
The zero alphas in texture.
Parameters
imageImage.
static PlaygroundEventC ParticlePlayground.PlaygroundC.CreateEvent ( )
static

Creates an empty event.

Returns
The event.
static PlaygroundEventC ParticlePlayground.PlaygroundC.CreateEvent ( PlaygroundParticlesC  playgroundParticles)
static

Creates an event into passed particle system.

Returns
The event.
Parameters
playgroundParticlesParticle Playground system.
static PlaygroundSpline ParticlePlayground.PlaygroundC.CreateSpline ( )
static

Creates a new Playground Spline. The spline will be attached to a new GameObject in your scene by the name "Playground Spline".

Returns
The Playground Spline component on the created GameObject.
static PlaygroundSpline ParticlePlayground.PlaygroundC.CreateSpline ( PlaygroundParticlesC  playgroundParticles)
static

Creates a new Playground Spline. The spline will be attached to a new GameObject in your scene by the name "Playground Spline" which is parented to the passed in Particle Playground system. The Particle Playground system will have the source spline automatically set.

Returns
The Playground Spline component on the created GameObject.
Parameters
playgroundParticlesParticle Playground system.
static void ParticlePlayground.PlaygroundC.Destroy ( PlaygroundParticlesC  playgroundParticles)
static

Destroys the passed in Particle System.

Parameters
playgroundParticlesPlayground particles.
static void ParticlePlayground.PlaygroundC.Emission ( PlaygroundParticlesC  playgroundParticles,
bool  emit 
)
static

Sets emission for this Particle System.

Parameters
playgroundParticlesPlayground particles.
emitIf set to true emit.
static void ParticlePlayground.PlaygroundC.Emission ( PlaygroundParticlesC  playgroundParticles,
bool  emit,
bool  restEmission 
)
static

Set emission for this Particle System controlling to run rest emission

Parameters
playgroundParticlesPlayground particles.
emitIf set to true emit.
restEmissionIf set to true rest emission.
static int ParticlePlayground.PlaygroundC.Emit ( PlaygroundParticlesC  playgroundParticles)
static

Emits next particle - using the particle system as a pool (note that you need to set scriptedEmission-variables on beforehand using this method). Returns emitted particle number.

Parameters
playgroundParticlesPlayground particles.
static int ParticlePlayground.PlaygroundC.Emit ( PlaygroundParticlesC  playgroundParticles,
Vector3  position,
Vector3  normal,
Color  color 
)
static

Emits next particle while setting scriptedEmission data - using the particle system as a pool. Returns emitted particle number.

Parameters
playgroundParticlesPlayground particles.
positionPosition.
normalNormal.
colorColor.
static void ParticlePlayground.PlaygroundC.Emit ( PlaygroundParticlesC  playgroundParticles,
bool  setEmission 
)
static

Sets emission on/off.

Parameters
playgroundParticlesPlayground particles.
setEmissionIf set to true set emission.
static bool ParticlePlayground.PlaygroundC.Erase ( PlaygroundParticlesC  playgroundParticles,
Vector3  position,
float  radius 
)
static

Live erases into a PlaygroundParticlesC PaintObject's positions, returns true if position was erased.

Parameters
playgroundParticlesPlayground particles.
positionPosition.
radiusRadius.
static bool ParticlePlayground.PlaygroundC.Erase ( PaintObjectC  paintObject,
Vector3  position,
float  radius 
)
static

Live erases into a PaintObject's positions directly, returns true if position was erased.

Parameters
paintObjectPaint object.
positionPosition.
radiusRadius.
static bool ParticlePlayground.PlaygroundC.Erase ( PlaygroundParticlesC  playgroundParticles,
int  index 
)
static

Live erases into a PlaygroundParticlesC PaintObject's using a specified index, returns true if position was erased.

Parameters
playgroundParticlesPlayground particles.
indexIndex.
static PlaygroundEventC ParticlePlayground.PlaygroundC.GetEvent ( int  i,
PlaygroundParticlesC  playgroundParticles 
)
static

Returns an event from PlaygroundParticlesC object in array position.

Returns
The event.
Parameters
iThe index.
playgroundParticlesParticle Playground system.
static ManipulatorObjectC ParticlePlayground.PlaygroundC.GetManipulator ( int  i)
static

Returns a global manipulator in array position.

Returns
The ManipulatorObjectC.
Parameters
iThe index.
static ManipulatorObjectC ParticlePlayground.PlaygroundC.GetManipulator ( int  i,
PlaygroundParticlesC  playgroundParticles 
)
static

Returns a manipulator in a PlaygroundParticlesC object in array position.

Returns
The ManipulatorObjectC.
Parameters
iThe index.
playgroundParticlesPlayground particles.
static List<PlaygroundEventParticle> ParticlePlayground.PlaygroundC.GetManipulatorParticles ( int  manipulator,
PlaygroundParticlesC  playgroundParticles 
)
static

Returns all current particles within a local manipulator (in form of an Event Particle, however no event will be needed).

Returns
The manipulator particles.
Parameters
manipulatorManipulator.
playgroundParticlesPlayground particles.
static List<PlaygroundEventParticle> ParticlePlayground.PlaygroundC.GetManipulatorParticles ( int  manipulator)
static

Returns all current particles within a global manipulator (in form of an Event Particle, however no event will be needed).

Returns
The manipulator particles.
Parameters
manipulatorManipulator.
static void ParticlePlayground.PlaygroundC.GetNormals ( Vector3[]  normals,
WorldObject  particleStateWorldObject 
)
static

Gets normals from a world object in Vector3[] format (notice that the array is modified by reference).

Parameters
normalsNormals.
particleStateWorldObjectWorld Object.
static int ParticlePlayground.PlaygroundC.GetPaintPositionLength ( PlaygroundParticlesC  playgroundParticles)
static

Gets the amount of paint positions in this PlaygroundParticlesC PaintObject.

Returns
The paint position length.
Parameters
playgroundParticlesPlayground particles.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.GetParticles ( int  i)
static

Returns a Particle Playground System in array position.

Returns
The particles.
Parameters
iThe index.
static Color32 [] ParticlePlayground.PlaygroundC.GetPixels ( Texture2D  image)
static

Returns pixels from a texture.

Returns
The pixels.
Parameters
imageImage.
static void ParticlePlayground.PlaygroundC.GetPosition ( SkinnedWorldObject  particleStateWorldObject,
bool  updateNormals 
)
static

Gets vertices and normals from a skinned world object in Vector3[] format (notice that the array is modified by reference).

Parameters
particleStateWorldObjectSkinned World Object.
updateNormalsIf set to true update normals.
static void ParticlePlayground.PlaygroundC.GetPosition ( Vector3[]  vertices,
WorldObject  particleStateWorldObject 
)
static

Gets vertices from a world object in Vector3[] format (notice that the array is modified by reference).

Parameters
verticesVertices.

<param name="particleStateWorldObject"World Object.

bool ParticlePlayground.PlaygroundC.HasEnabledGlobalManipulators ( )

Determines whether there is enabled global manipulators which should be calculated.

Returns
true if there is enabled global manipulators; otherwise, false.
static bool ParticlePlayground.PlaygroundC.HasPlaygroundPool ( )
static

Determines if the Playground Manager has a Playground Pool assigned.

Returns
true if having a Playground Pool; otherwise, false.
static bool ParticlePlayground.PlaygroundC.HasReference ( )
static

Determines if the Playground Manager has its reference assigned.

Returns
true if having a reference; otherwise, false.
IEnumerator ParticlePlayground.PlaygroundC.InitializePlayground ( )

Initializes the Playground Manager.

static PlaygroundParticlesC ParticlePlayground.PlaygroundC.InstantiatePreset ( string  presetName)
static

Instantiates a preset by name reference. Any preset you wish to instantiate using the InstantiatePreset method needs to be in a 'Resources/Presets/' folder.

Returns
The preset as a PlaygroundParticlesC object.
Parameters
presetNamePreset name.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.InstantiatePreset ( string  categoryName,
string  presetName 
)
static

Instantiates a preset by category and name reference. The category is the name of the folder. Any preset you wish to instantiate using this InstantiatePreset overload needs to be in a 'Resources/Presets/categoryName/' folder.

Returns
The preset as a PlaygroundParticlesC object.
Parameters
categoryNameCategory name.
presetNamePreset name.
bool ParticlePlayground.PlaygroundC.IsDoneThread ( )

Determines whether the thread for threadMethod if set to ThreadMethod.OneForAll is finished. This is always true when any other method is selected.

Returns
true if the OneForAll thread is finished; otherwise, false.
bool ParticlePlayground.PlaygroundC.IsDoneThreadSkinnedMeshes ( )

Determines whether the thread for skinned meshes is done.

Returns
true if the thread for skinned meshes is done; otherwise, false.
bool ParticlePlayground.PlaygroundC.IsDoneThreadTurbulence ( )

Determines whether the thread for turbulence is done.

Returns
true if thread for turbulence is done; otherwise, false.
bool ParticlePlayground.PlaygroundC.IsFirstUnsafeAutomaticFrames ( )

Determines whether the multithreading is within the initial first unsafe frames.

Returns
true if it is the first unsafe automatic frames; otherwise, false.
static int ParticlePlayground.PlaygroundC.Largest ( int[]  compare)
static

Compares and returns the largest number in an int array.

Parameters
compareInts to compare.
static ManipulatorObjectC ParticlePlayground.PlaygroundC.ManipulatorObject ( MANIPULATORTYPEC  type,
LayerMask  affects,
Transform  manipulatorTransform,
float  size,
float  strength 
)
static

Creates a manipulator object.

Returns
The ManipulatorObjectC.
Parameters
typeType.
affectsAffects.
manipulatorTransformManipulator transform.
sizeSize.
strengthStrength.
static ManipulatorObjectC ParticlePlayground.PlaygroundC.ManipulatorObject ( Transform  manipulatorTransform)
static

Creates a manipulator object by transform.

Returns
The ManipulatorObjectC.
Parameters
manipulatorTransformManipulator transform.
static ManipulatorObjectC ParticlePlayground.PlaygroundC.ManipulatorObject ( MANIPULATORTYPEC  type,
LayerMask  affects,
Transform  manipulatorTransform,
float  size,
float  strength,
PlaygroundParticlesC  playgroundParticles 
)
static

Create a manipulator in a PlaygroundParticlesC object

Returns
The ManipulatorObjectC.
Parameters
typeType.
affectsAffects.
manipulatorTransformManipulator transform.
sizeSize.
strengthStrength.
playgroundParticlesPlayground particles.
static ManipulatorObjectC ParticlePlayground.PlaygroundC.ManipulatorObject ( Transform  manipulatorTransform,
PlaygroundParticlesC  playgroundParticles 
)
static

Creates a manipulator in a PlaygroundParticlesC object by transform.

Returns
The ManipulatorObjectC.
Parameters
manipulatorTransformManipulator transform.
playgroundParticlesPlayground particles.
static int ParticlePlayground.PlaygroundC.Paint ( PlaygroundParticlesC  playgroundParticles,
Vector3  position,
Vector3  normal,
Transform  parent,
Color32  color 
)
static

Live paints into a PlaygroundParticlesC PaintObject's positions.

Parameters
playgroundParticlesPlayground particles.
positionPosition.
normalNormal.
parentParent.
colorColor.
static void ParticlePlayground.PlaygroundC.Paint ( PaintObjectC  paintObject,
Vector3  position,
Vector3  normal,
Transform  parent,
Color32  color 
)
static

Live paints into a PaintObject's positions directly.

Parameters
paintObjectPaint object.
positionPosition.
normalNormal.
parentParent.
colorColor.
static PaintObjectC ParticlePlayground.PlaygroundC.PaintObject ( PlaygroundParticlesC  playgroundParticles)
static

Creates a paint object reference.

Returns
The object.
Parameters
playgroundParticlesPlayground particles.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( )
static

Creates a PlaygroundParticlesC object by standard prefab

static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Texture2D  image,
string  name,
Vector3  position,
Quaternion  rotation,
Vector3  offset,
float  particleSize,
float  scale,
Material  material 
)
static

Creates a PlaygroundParticlesC object with an image state.

Parameters
imageImage.
nameName.
positionPosition.
rotationRotation.
offsetOffset.
particleSizeParticle size.
scaleScale.
materialMaterial.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Texture2D  image)
static

Creates a PlaygroundParticlesC object with an image state.

Parameters
imageThe particle system instance.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Texture2D[]  images,
string  name,
Vector3  position,
Quaternion  rotation,
Vector3  offset,
float  particleSize,
float  scale,
Material  material 
)
static

Creates a PlaygroundParticlesC object with several image states.

Parameters
imagesImages.
nameName.
positionPosition.
rotationRotation.
offsetOffset.
particleSizeParticle size.
scaleScale.
materialMaterial.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Texture2D[]  images)
static

Creates a PlaygroundParticlesC object with several image states.

Parameters
imagesImages.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Mesh  mesh,
Texture2D  texture,
string  name,
Vector3  position,
Quaternion  rotation,
float  particleScale,
Vector3  offset,
Material  material 
)
static

Creates a PlaygroundParticlesC object with a mesh state.

Parameters
meshMesh.
textureTexture.
nameName.
positionPosition.
rotationRotation.
particleScaleParticle scale.
offsetOffset.
materialMaterial.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Mesh  mesh,
Texture2D  texture 
)
static

Creates a PlaygroundParticlesC object with a mesh state.

Parameters
meshMesh.
textureTexture.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Mesh[]  meshes,
Texture2D[]  textures,
string  name,
Vector3  position,
Quaternion  rotation,
float  particleScale,
Vector3[]  offsets,
Material  material 
)
static

Creates a PlaygroundParticlesC object with several mesh states.

Parameters
meshesMeshes.
texturesTextures.
nameName.
positionPosition.
rotationRotation.
particleScaleParticle scale.
offsetsOffsets.
materialMaterial.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.Particle ( Mesh[]  meshes,
Texture2D[]  textures 
)
static

Creates a PlaygroundParticlesC object with several mesh states.

Parameters
meshesMeshes.
texturesTextures.
static PlaygroundParticlesC ParticlePlayground.PlaygroundC.ParticleNew ( )
static

Creates an empty PlaygroundParticlesC object by script

Returns
The particle system instance.
static ParticleProjectionC ParticlePlayground.PlaygroundC.ParticleProjection ( PlaygroundParticlesC  playgroundParticles)
static

Creates a projection object reference.

Returns
The projection.
Parameters
playgroundParticlesPlayground particles.
static float [] ParticlePlayground.PlaygroundC.RandomFloat ( int  length,
float  min,
float  max 
)
static

Returns a float array by random values.

Returns
The float.
Parameters
lengthLength.
minMinimum.
maxMax.
static Vector3 [] ParticlePlayground.PlaygroundC.RandomVector3 ( int  length,
Vector3  min,
Vector3  max 
)
static

Returns a random vector3-array.

Returns
The vector3.
Parameters
lengthLength.
minMinimum.
maxMax.
static void ParticlePlayground.PlaygroundC.RefreshScatter ( PlaygroundParticlesC  playgroundParticles)
static

Refreshes source scatter for this Particle System.

Parameters
playgroundParticlesPlayground particles.
static void ParticlePlayground.PlaygroundC.RemoveEvent ( int  i,
PlaygroundParticlesC  playgroundParticles 
)
static

Removes the event.

Parameters
iThe index.
playgroundParticlesPlayground particles.
static GameObject ParticlePlayground.PlaygroundC.ResourceInstantiate ( string  n)
static

Instantiates from Resources.

Returns
The instantiate.
Parameters
nN.
static void ParticlePlayground.PlaygroundC.RunAsync ( Action  a,
ThreadPoolMethod  threadPoolMethod 
)
static

Runs an action asynchrounously on a second thread. Use a lambda expression to pass data to another thread.

Parameters
aThe action.
static void ParticlePlayground.PlaygroundC.SendParticleEventBirth ( PlaygroundEventParticle  eventParticle)
static

Sends the particle event birth.

Parameters
eventParticleEvent particle.
static void ParticlePlayground.PlaygroundC.SendParticleEventCollision ( PlaygroundEventParticle  eventParticle)
static

Sends the particle event collision.

Parameters
eventParticleEvent particle.
static void ParticlePlayground.PlaygroundC.SendParticleEventDeath ( PlaygroundEventParticle  eventParticle)
static

Sends the particle event death.

Parameters
eventParticleEvent particle.
static void ParticlePlayground.PlaygroundC.SendParticleEventTime ( PlaygroundEventParticle  eventParticle)
static

Sends the particle event time.

Parameters
eventParticleEvent particle.
static void ParticlePlayground.PlaygroundC.SetAlpha ( PlaygroundParticlesC  playgroundParticles,
float  alpha 
)
static

Sets alpha of particles instantly.

Parameters
playgroundParticlesPlayground particles.
alphaAlpha.
static void ParticlePlayground.PlaygroundC.SetInitialTargetPosition ( PlaygroundParticlesC  playgroundParticles,
Vector3  position 
)
static

Sets initial target position for this Particle System.

Parameters
playgroundParticlesPlayground particles.
positionPosition.
static void ParticlePlayground.PlaygroundC.SetLifetime ( PlaygroundParticlesC  playgroundParticles,
float  time 
)
static

Sets lifetime for this Particle System.

Parameters
playgroundParticlesPlayground particles.
timeTime.
static void ParticlePlayground.PlaygroundC.SetMaterial ( PlaygroundParticlesC  playgroundParticles,
Material  particleMaterial 
)
static

Sets material for this Particle System.

Parameters
playgroundParticlesPlayground particles.
particleMaterialParticle material.
static void ParticlePlayground.PlaygroundC.SetMaxThreads ( int  threadCount)
static

Sets the maximum threads allowed. When using Thread Pool Method: Playground Pool this will set the amount of reused threads.

Parameters
threadCountThe amount of threads.
static void ParticlePlayground.PlaygroundC.SetParticleCount ( PlaygroundParticlesC  playgroundParticles,
int  amount 
)
static

Sets amount of particles for this Particle System.

Parameters
playgroundParticlesPlayground particles.
amountAmount.
static void ParticlePlayground.PlaygroundC.SetSize ( PlaygroundParticlesC  playgroundParticles,
float  size 
)
static

Sets particle size.

Parameters
playgroundParticlesPlayground particles.
sizeSize.
static void ParticlePlayground.PlaygroundC.SetTime ( )
static

Updates the global time.

static void ParticlePlayground.PlaygroundC.ShuffleArray ( float[]  arr)
static

Shuffles an existing built-in float array.

Parameters
arrArr.
static void ParticlePlayground.PlaygroundC.ShuffleArray ( int[]  arr)
static

Shuffles an existing built-in int array.

Parameters
arrArr.
static SkinnedWorldObject ParticlePlayground.PlaygroundC.SkinnedWorldObject ( Transform  meshTransform)
static

Creates a skinned world object reference (used for live world positioning of particles towards a mesh).

Returns
The world object.
Parameters
meshTransformMesh transform.
static void ParticlePlayground.PlaygroundC.TimeReset ( )
static

Reset time

static void ParticlePlayground.PlaygroundC.Translate ( PlaygroundParticlesC  playgroundParticles,
Vector3  direction 
)
static

Translates all particles in Particle System.

Parameters
playgroundParticlesPlayground particles.
directionDirection.
static WorldObject ParticlePlayground.PlaygroundC.WorldObject ( Transform  meshTransform)
static

Creates a world object reference (used for live world positioning of particles towards a mesh).

Returns
The object.
Parameters
meshTransformMesh transform.

Member Data Documentation

bool ParticlePlayground.PlaygroundC.autoGroup = true

Automatically parent a PlaygroundParticlesC object to Playground if it has no parent.

bool ParticlePlayground.PlaygroundC.buildZeroAlphaPixels = false

Turn this on if you want to build particles from 0 alpha pixels into states.

bool ParticlePlayground.PlaygroundC.calculate = true

Calculate forces on PlaygroundParticlesC objects.

float ParticlePlayground.PlaygroundC.collisionPlaneScale = .1f

Scale of collision planes.

float ParticlePlayground.PlaygroundC.collisionSleepVelocity = .01f
static

Minimum velocity of a particle before it goes to rest on collision.

bool ParticlePlayground.PlaygroundC.drawGizmos = true

Draw gizmos for manipulators and other particle system helpers in Scene View.

bool ParticlePlayground.PlaygroundC.drawSourcePositions = false

Draw gizmos for source positions in Scene View.

bool ParticlePlayground.PlaygroundC.drawSplinePreview = true

Determines to draw previews of Playground Splines in Scene View.

bool ParticlePlayground.PlaygroundC.drawWireframe = false

Should wireframes be rendered around particles in Scene View?

Plane [] ParticlePlayground.PlaygroundC.frustumPlanes
static

The frustum planes of the Main Camera. This is used to disable or enable calculation on particle systems when having PlaygroundParticlesC.pauseCalculationWhenInvisible enabled.

float ParticlePlayground.PlaygroundC.globalDeltaTime
static

Delta time for globalTime (globalTime-lastTimeUpdated).

float ParticlePlayground.PlaygroundC.globalTime
static

The global time.

float ParticlePlayground.PlaygroundC.globalTimescale = 1.0f
static

Scaling of globalTime.

bool ParticlePlayground.PlaygroundC.globalTimeScale = true

Determines if Time.timeScale should affect the particle systems simulation time. If disabled you can keep simulating particles in normal speed detached from the scene's time scale.

Vector3 ParticlePlayground.PlaygroundC.initialTargetPosition = new Vector3(0,-999.99f,0)
static

Initial spawn position when particle is not set to rebirth.

float ParticlePlayground.PlaygroundC.lastTimeUpdated
static

Time when globalTime last updated.

List<ManipulatorObjectC> ParticlePlayground.PlaygroundC.manipulators = new List<ManipulatorObjectC>()

The manipulators controlled by this Playground Manager.

int ParticlePlayground.PlaygroundC.maxThreads = 8

The maximum amount of threads that can be created. The amount of created threads will never exceed available CPUs.

int ParticlePlayground.PlaygroundC.paintMaxPositions = 10000

Maximum amount of emission positions in a PaintObject.

bool ParticlePlayground.PlaygroundC.paintToolbox = true

Show toolbox in Scene View when Source is set to Paint on PlaygroundParticlesC objects.

List<PlaygroundParticlesC> ParticlePlayground.PlaygroundC.particleSystems = new List<PlaygroundParticlesC>()

The particle systems controlled by this Playground Manager.

PIXELMODEC ParticlePlayground.PlaygroundC.pixelFilterMode = PIXELMODEC.Pixel32

Color filtering mode.

PlaygroundQueue<Action> ParticlePlayground.PlaygroundC.playgroundPool
static

The Particle Playground-managed thread pool. The maxThreads value will determine how many threads will be available in the pool.

PlaygroundC ParticlePlayground.PlaygroundC.reference
static

Static reference to the Playground Manager script.

GameObject ParticlePlayground.PlaygroundC.referenceGameObject
static

Static reference to the Playground Manager GameObject.

Transform ParticlePlayground.PlaygroundC.referenceTransform
static

Static reference to the Playground Manager Transform.

bool ParticlePlayground.PlaygroundC.showShuriken = false

Should the Shuriken particle system component be visible? (This is just a precaution as editing Shuriken can lead to unexpected behavior).

bool ParticlePlayground.PlaygroundC.showSnapshotsInHierarchy = false

Should snapshots be visible in the Hieararchy? (Enable this if you want to edit snapshots).

int ParticlePlayground.PlaygroundC.skinnedUpdateRate = 1
static

Update rate for finding vertices in skinned meshes (1 = Every frame, 2 = Every second frame...).

ThreadMethod ParticlePlayground.PlaygroundC.threadMethod = ThreadMethod.Automatic

The multithreading method Particle Playground should use. This determines how particle systems calculate over the CPU. Keep in mind each thread will generate memory garbage which will be collected at some point. Selecting ThreadMethod.NoThreads will make particle systems calculate on the main-thread. ThreadMethod.OnePerSystem will create one thread per particle system each frame. ThreadMethod.OneForAll will bundle all calculations into one single thread. ThreadMethod.Automatic will distribute all particle systems evenly bundled along available CPUs/cores. This is the recommended setting for most user cases.

ThreadPoolMethod ParticlePlayground.PlaygroundC.threadPoolMethod = ThreadPoolMethod.PlaygroundPool

The thread pool method determines which thread pooling should be used. ThreadPoolMethod.ThreadPool will use the .NET managed ThreadPool class (standard in Particle Playground in versions prior to 3). ThreadPoolMethod.PlaygroundPool will use the self-managed PlaygroundQueue which queues tasks on reused threads (standard in Particle Playground 3 and up).

bool ParticlePlayground.PlaygroundC.triggerSceneRepaint = true
static

Let a PlaygroundParticleWindow repaint the scene.

int ParticlePlayground.PlaygroundC.unsafeAutomaticThreadFrames = 20
static

Determines how many frames are unsafe before initiating automatic thread bundling.

Event Documentation

OnPlaygroundParticle ParticlePlayground.PlaygroundC.particleEventBirth
static

The event of a particle birthing. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager.

OnPlaygroundParticle ParticlePlayground.PlaygroundC.particleEventCollision
static

The event of a particle colliding. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager.

OnPlaygroundParticle ParticlePlayground.PlaygroundC.particleEventDeath
static

The event of a particle dying. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager.

OnPlaygroundParticle ParticlePlayground.PlaygroundC.particleEventTime
static

The event of a particle sent by timer. This require that you are using Event Listeners and set your desired particle system(s) to broadcast the event by enabling PlaygroundEventC.sendToManager.


The documentation for this class was generated from the following file: