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.PlaygroundParticlesC Class Reference

The PlaygroundParticlesC class is a Particle Playground system driven by the Playground Manager (PlaygroundC). A Particle Playground system contains settings and data for altering a Shuriken component. More...

Inheritance diagram for ParticlePlayground.PlaygroundParticlesC:
ParticlePlayground.MeshParticles

Public Member Functions

void CopyTo (PlaygroundParticlesC playgroundParticles)
 Clones the settings of this Particle Playground system into the passed reference. Note that you additionally need to use CopySaveDataTo() if you want to clone the Snapshots. More...
 
void CopySaveDataTo (PlaygroundParticlesC playgroundParticles)
 Copies stored data of Snapshots into a particle system (separated from CopyTo() to solve Save/Load overwrite paradox). More...
 
void Emit (bool setEmission)
 Sets emission On or Off. More...
 
int Emit ()
 Emits a single particle at previously set scripted emission position, velocity and color. More...
 
int Emit (Vector3 givePosition)
 Emits a single particle at position with previously set scripted emission velocity and color. More...
 
int Emit (Vector3 givePosition, Vector3 giveVelocity)
 Emits a single particle at position with velocity, the color will be set from the previous scripted emission color. More...
 
int Emit (Vector3 givePosition, Vector3 giveVelocity, Color32 giveColor)
 Emits a single particle at position with velocity and color (Source Mode SOURCEC.Script will be automatically set). More...
 
void Emit (int quantity)
 Emits number of particles set by quantity. All other values will be set from the previous scripted emission call (or as set in Inspector). More...
 
void Emit (int quantity, Vector3 givePosition, Vector3 randomVelocityMin, Vector3 randomVelocityMax, Color32 giveColor)
 Emits number of particles set by quantity, position and minimum - maximum random velocity. More...
 
void Emit (int quantity, Vector3 randomPositionMin, Vector3 randomPositionMax, Vector3 randomVelocityMin, Vector3 randomVelocityMax, Color32 giveColor)
 Emits number of particles set by quantity, minimum - maximum random position and velocity. More...
 
int Emit (float giveLifetime)
 Emits a single particle with specified lifetime. This will set particle position, velocity and color from previously called emission (as set in the Source tab). More...
 
int Emit (Vector3 givePosition, float giveLifetime)
 Emits a single particle with specified lifetime. This will set particle velocity and color from previously called emission (as set in the Source tab). More...
 
int Emit (Vector3 givePosition, Vector3 giveVelocity, float giveLifetime)
 Emits a single particle with specified lifetime. This will set particle color from previously called emission (as set in the Source tab). More...
 
int Emit (Vector3 givePosition, Vector3 giveVelocity, float giveLifetime, Color32 giveColor)
 Emits a single particle with specified position, velocity, lifetime and color. More...
 
void ThreadSafeEmit (Vector3 givePosition, Vector3 giveVelocity, Color32 giveColor)
 Thread-safe version of Emit(). More...
 
void ThreadSafeEmit (int quantity, Vector3 givePosition, Vector3 randomVelocityMin, Vector3 randomVelocityMax, Color32 giveColor)
 
bool IsAlive ()
 Checks if particles are still in simulation. More...
 
bool IsLocalSpace ()
 Determines whether this particle system is simulated in local space. More...
 
bool InTransition ()
 Determines if this particle system is in a transition. More...
 
bool IsLoading ()
 Determines whether this particle system is loading a snapshot. More...
 
bool IsSaving ()
 Determines whether this particle system is saving a snapshot. More...
 
bool IsReady ()
 Check if the particle system is ready. You should wait for IsReady() to become true before calling any scripted emission. This returns the same result as calling Initialized(). More...
 
bool Initialized ()
 Check if the particle system is ready. You should wait for Initialized() to become true before calling any scripted emission. More...
 
bool IsYieldRefreshing ()
 Determines whether this particle system is yield refreshing. More...
 
bool IsSettingParticleTime ()
 
bool IsSkinnedWorldObjectReady ()
 Determines whether the skinned world object is ready. More...
 
bool HasTurbulence ()
 Determines whether this particle system has turbulence active. More...
 
bool HasOverflow ()
 Determines whether this particle system has overflow set by Overflow Offset. More...
 
bool HasGlobalManipulator ()
 Determines whether this particle system may be affected by one or more available Global Manipulators. More...
 
bool HasCollisionCache ()
 Determines whether this particle system has an initialized collision cache. More...
 
bool HasCollided (int index)
 Determines if a particle at specified index has collided during its lifetime. More...
 
Vector3 GetCollisionPosition (int index)
 Gets the particle collision position at index. More...
 
Vector3 GetCollisionNormal (int index)
 Gets the particle collision normal at index. More...
 
Vector3 GetStickyPosition (int index)
 Gets the particle sticky position at index. Note that stickyCollisions must be enabled to return expected values. More...
 
void SetSticky (int index, Vector3 position, Vector3 normal, float offset, Transform parent)
 Sets the particle at index to stick onto a parent transform. More...
 
void UpdateSticky (int index)
 Updates the sticky particle position. More...
 
void ClearCollisions ()
 Clears the collisions. Use this if you for example want to toggle between sticky and non-sticky particle behaviors. More...
 
void ClearCollisions (int index)
 Clears the collisions at index. Use this if you for example want to toggle between sticky and non-sticky particle behaviors. More...
 
Transform GetCollisionTransform (int index)
 Gets the particle collision transform at index. More...
 
int GetLayer ()
 Gets the layer this particle system is within. This is safe to call from another thread. More...
 
void SetRandomSeed (int seed)
 Sets the random seed for the internal System.Random. More...
 
bool IsReportingBadUpdateRate ()
 Determines whether this particle system is reporting bad update rate. You will also see the "P" icon indicator in the Hierarchy turn red in Play Mode whenever this returns true. More...
 
float GetDeltaTime ()
 Gets the current delta time of a particle system's update loop. More...
 
SimplexNoise GetSimplex ()
 Gets the running simplex algorithm. More...
 
void Kill (int p)
 Kill the specified particle. More...
 
void KillAndSendManipulatorDeathEvents (int p)
 Kill the specified particle and send death events to all Manipulators tracking particles. More...
 
void SetNoForce (int p, bool noForce)
 Sets a particle to no longer respond to forces. More...
 
bool NoForce (int p)
 Determines if the particle have noForce set to true More...
 
void Translate (int p, Vector3 translation)
 Translate the specified particle More...
 
void ParticlePosition (int p, Vector3 position)
 Positions the specified particle. More...
 
void ParticleColor (int p, Color32 color)
 Sets the color of the specified particle. More...
 
void ParticleSize (int p, float size)
 Sets the size of the specified particle. More...
 
void ParticleVelocity (int p, Vector3 velocity)
 Sets the velocity of the specified particle. More...
 
void PositionToTransformPoint (int p, Vector3 position, Transform targetTransform)
 Positions to transform point. More...
 
void PositionToInverseTransformPoint (int p, Vector3 position, Transform targetTransform)
 Positions to inverse transform point. More...
 
Vector3 GetParticlePosition (int p)
 Gets the particle position. More...
 
Vector3 GetSourcePosition (int p)
 
void SetHasActiveParticles ()
 
bool HasSeveralManipulatorEvents ()
 Determines whether this particle system has several manipulator events. More...
 
void ProtectParticleFromManipulator (int particle, ManipulatorObjectC manipulator)
 Protects the particle from specified manipulator. More...
 
void RemoveParticleProtection (int particle)
 Removes the particle protection. More...
 
bool IsSettingLifetime ()
 Determines whether this particle system is currently setting the lifetime. As the particle system may run on a second thread this can be used to wait until it is ready to simulate. More...
 
bool IsPrewarming ()
 Determines whether this particle system is currently prewarming. More...
 
bool IsParticleInsideManipulator (int particleId, ManipulatorObjectC manipulator)
 Determines whether a particle is inside the area of a Manipulator. More...
 
int GetSplineIndex ()
 Gets the index of the source spline which currently is read in simulation. More...
 
int GetTransformIndex ()
 Gets the index of the source transform which currently is read in simulation. More...
 
void RefreshMaskSorting ()
 Refreshes the mask sorting. If you're using a particleMaskSorting of MASKSORTINGC.Scrambled you can use this to randomize new mask positions. More...
 
void RefreshMaskSorting (int[] maskSortingArray)
 Refresh the mask sorting by sending in a custom int[] array. The passed in maskSortingArray should contain all numbers from 0 to particleCount-1, it will then apply non-linear masking depending on the order of the numbers in releation to the actual particle array. More...
 
void RefreshSystemRandom ()
 
bool IsSettingParticleCount ()
 
bool UpdateSystem ()
 Updates a PlaygroundParticlesC object (called each calculation step from PlaygroundC). More...
 
void UpdateShuriken ()
 Updates the Shuriken component. This sets all particles previously calculated and syncs particle positioning if syncPositionsOnMainThread is true. More...
 
bool PrepareThreadedCalculations ()
 Prepares all values for calculation which is not thread-safe. More...
 
void CalculateCollisions ()
 
void RefreshScatter ()
 
void InactivateParticle (int particleId)
 
void InactivateParticles ()
 
bool UpdateEventParticle (PlaygroundEventParticle eParticle, int p)
 
void RemoveState (int i)
 
void Save ()
 Store the current state of a particle system as a Snapshot. More...
 
void Save (string saveName)
 Store the current state of a particle system as a Snapshot and name it. More...
 
void Load (int loadPointer)
 Load from a saved data state (Snapshot) using an int. More...
 
void Load (string loadName)
 Load from a saved data state (Snapshot) using a string. More...
 
void LoadAndApplyMask (int loadPointer, int loadMask)
 Load from a saved data state (Snapshot) and apply a mask to hide specified particles. The mask sorting will be determined by the loading snapshot's mask settings. More...
 
IEnumerator YieldedRefresh ()
 
void Start ()
 
IEnumerator Boot ()
 

Static Public Member Functions

static PlaygroundParticlesC CreatePlaygroundParticles (Texture2D[] images, string name, Vector3 position, Quaternion rotation, Vector3 offset, float particleSize, float scale, Material material)
 Creates a new PlaygroundParticlesC object. More...
 
static void OnCreatePlaygroundParticles (PlaygroundParticlesC playgroundParticles)
 Sets default settings for a PlaygroundParticlesC object. More...
 
static PlaygroundParticlesC CreateParticleObject (string name, Vector3 position, Quaternion rotation, float particleSize, Material material)
 Creates a Shuriken Particle System. More...
 
static WorldObject NewWorldObject (Transform meshTransform)
 Creates a new WorldObject. More...
 
static SkinnedWorldObject NewSkinnedWorldObject (Transform meshTransform)
 Creates a new SkinnedWorldObject. More...
 
static SkinnedWorldObject NewSkinnedWorldObject (Transform meshTransform, int downResolution)
 Creates a new SkinnedWorldObject with pre-set down resolution. More...
 
static PaintObjectC NewPaintObject (PlaygroundParticlesC playgroundParticles)
 Creates a new PaintObject. More...
 
static ParticleProjectionC NewProjectionObject (PlaygroundParticlesC playgroundParticles)
 Creates a new ParticleProjection object. More...
 
static ManipulatorObjectC NewManipulatorObject (MANIPULATORTYPEC type, LayerMask affects, Transform manipulatorTransform, float size, float strength, PlaygroundParticlesC playgroundParticles)
 Creates a new ManipulatorObject and attach to the Playground Manager. More...
 
static void GetPosition (SkinnedWorldObject particleStateWorldObject, bool updateNormals)
 
static void GetPosition (Vector3[] v3, WorldObject particleStateWorldObject)
 
static void GetProceduralPosition (Vector3[] v3, WorldObject particleStateWorldObject)
 
static void GetNormals (Vector3[] v3, WorldObject particleStateWorldObject)
 
static void SetSize (PlaygroundParticlesC playgroundParticles, float size)
 
static void SetSizeRandom (PlaygroundParticlesC playgroundParticles, float sizeMinimum, float sizeMaximum)
 
static void SetRotationRandom (PlaygroundParticlesC playgroundParticles, float rotationMinimum, float rotationMaximum)
 
static void SetInitialRotationRandom (PlaygroundParticlesC playgroundParticles, float rotationMinimum, float rotationMaximum)
 
static void SetVelocityRandom (PlaygroundParticlesC playgroundParticles, Vector3 velocityMinimum, Vector3 velocityMaximum)
 
static void SetLocalVelocityRandom (PlaygroundParticlesC playgroundParticles, Vector3 velocityMinimum, Vector3 velocityMaximum)
 
static void SetMaterial (PlaygroundParticlesC playgroundParticles, Material particleMaterial)
 
static void SetAlpha (PlaygroundParticlesC playgroundParticles, float alpha)
 
static void Translate (PlaygroundParticlesC playgroundParticles, Vector3 direction)
 
static void Add (PlaygroundParticlesC playgroundParticles, ParticleStateC state)
 
static void Add (PlaygroundParticlesC playgroundParticles, Texture2D image, float scale, Vector3 offset, string stateName, Transform stateTransform)
 
static void Add (PlaygroundParticlesC playgroundParticles, Texture2D image, Texture2D depthmap, float depthmapStrength, float scale, Vector3 offset, string stateName, Transform stateTransform)
 
static void Destroy (PlaygroundParticlesC playgroundParticles)
 
static void SetLifetime (PlaygroundParticlesC playgroundParticles, SORTINGC sorting, float time)
 
static void SetLifetimeAsyncFriendly (PlaygroundParticlesC playgroundParticles, SORTINGC sorting, float time)
 
static void SetLifetimeSubtraction (PlaygroundParticlesC playgroundParticles)
 
static void SetEmissionRate (PlaygroundParticlesC playgroundParticles)
 
static void SetParticleTimeNow (PlaygroundParticlesC playgroundParticles)
 
static void SetParticleTimeNowWithRestEmission (PlaygroundParticlesC playgroundParticles)
 
static Color32 GetColorAtLifetime (PlaygroundParticlesC playgroundParticles, float time)
 
static void SetColorAtLifetime (PlaygroundParticlesC playgroundParticles, float time)
 
static void SetColorWithLifetimeSorting (PlaygroundParticlesC playgroundParticles)
 
static void SetParticleCount (PlaygroundParticlesC playgroundParticles, int amount)
 
static void SetInitialTargetPosition (PlaygroundParticlesC playgroundParticles, Vector3 position, bool refreshParticleSystem)
 
static void Emission (PlaygroundParticlesC playgroundParticles, bool emission, bool callRestEmission)
 
static float SignedAngle (Vector3 a, Vector3 b, Vector3 n)
 
static Vector3 RandomVector3 (System.Random random, Vector3 v1, Vector3 v2)
 
static void NewCalculatedThread (PlaygroundParticlesC playgroundParticles)
 
static void NewCalculatedThread (PlaygroundParticlesC[] playgroundParticles)
 
static void ThreadedCalculations (PlaygroundParticlesC playgroundParticles)
 Asynchronous-friendly particle calculation routine. More...
 
static void SendDeathEvents (PlaygroundParticlesC playgroundParticles, int p)
 Sends the death events. More...
 
static void Turbulence (PlaygroundParticlesC playgroundParticles, SimplexNoise turbulenceSimplex, int p, float t, TURBULENCETYPE turbulenceType, float turbulenceTimeScale, float turbulenceScale, float turbulenceStrength, bool turbulenceApplyLifetimeStrength, AnimationCurve turbulenceLifetimeStrength)
 
static void Collisions (PlaygroundParticlesC playgroundParticles)
 Calculates particle collisions, this runs automatically if collision is set to true. (Must currently run on main-thread due to the Physics.Raycast dependency.) More...
 
static Vector3 GetOverflow2 (Vector3 overflow, int currentVal, int maxVal)
 Returns the offset as a remainder from a point, constructed for multithreading. More...
 
static Vector3 GetOverflow2 (Vector3 overflow, Vector3 direction, int currentVal, int maxVal)
 Returns the offset with direction as a remainder from a point, constructed for multithreading. More...
 
static Vector3 Vector3Scale (Vector3 v1, Vector3 v2)
 Multiplies two Vector3. More...
 
static void CalculateManipulator (PlaygroundParticlesC playgroundParticles, ManipulatorObjectC thisManipulator, int p, float t, float life, Vector3 particlePosition, Vector3 manipulatorPosition, bool localSpace)
 Calculates the effect from a Manipulator. More...
 
static void PropertyManipulator (PlaygroundParticlesC playgroundParticles, ManipulatorObjectC thisManipulator, ManipulatorPropertyC thisManipulatorProperty, float manipulatorStrength, int p, float t, Vector3 particlePosition, Vector3 manipulatorPosition, float manipulatorDistance, bool localSpace, bool contains)
 Calculates the effect from Manipulator's properties. More...
 
static float RandomRange (System.Random random, float min, float max)
 Returns a random range float, adapted for threading. More...
 
static Vector3 RandomRange (System.Random random, Vector3 min, Vector3 max)
 Random range Vector3 adapted for threading. This produces a rectangular random position inside min to max. Should you want spherical distribution use RandomRangeSpherical instead. More...
 
static Vector3 RandomRangeSpherical (System.Random random, float min, float max)
 Spherical random range Vector3, adapted for threading. More...
 
static Vector3 RandomRangeSpherical (System.Random random, float min, float max, float step)
 
static Vector3 RandomRangeSpherical (System.Random random, float min, float max, float sectorA, float sectorB)
 
static Vector3 RandomRangeSpherical (System.Random random, float min, float max, float sectorA, float sectorB, float step)
 
static float[] RandomFloat (int length, float min, float max, System.Random random)
 
static void Rebirth (PlaygroundParticlesC playgroundParticles, int p, System.Random random)
 
static void Clear (PlaygroundParticlesC playgroundParticles)
 

Public Attributes

SOURCEC source
 The particle source method for distributing particles upon birth. More...
 
int activeState
 Current active state (when using state as source). More...
 
bool emit = true
 If emission of particles is active on this PlaygroundParticles. More...
 
bool loop = true
 Should a particle re-emit when reaching the end of its lifetime? More...
 
bool clearParticlesOnEmissionStop = false
 Should particles be removed instantly when you set emit to false? More...
 
bool disableOnDone = false
 Should the GameObject of this PlaygroundParticlesC disable when not looping? More...
 
ONDONE disableOnDoneRoutine
 The routine that should run when particle simulation has ended. More...
 
int updateRate = 1
 The rate to update this PlaygroundParticles. More...
 
bool calculate = true
 Determins if this particle system should calculate (can be overrided by PlaygroundC.calculate). This will automatically enable/disable when pauseCalculationWhenInvisible is set to true. More...
 
bool calculateDeltaMovement = true
 Calculate the delta movement force of this particle system. More...
 
float deltaMovementStrength = 10f
 The strength to multiply delta movement with. More...
 
float minDeltaMovementStrength = 0
 The minimum strength to multiply delta movement with. This will apply when using deltaMovementStrengthValueMethod of RandomBetweenTwoValues. More...
 
VALUEMETHOD deltaMovementStrengthValueMethod
 
bool worldObjectUpdateVertices = false
 The current world object will change its vertices over time. This produces memory garbage with quantity based upon the mesh vertices. More...
 
bool worldObjectUpdateNormals = false
 The current world object will change its normals over time. This produces memory garbage with quantity based upon the mesh normals. More...
 
NEARESTNEIGHBORORIGINMETHOD nearestNeighborOriginMethod
 The method to set the Lifetime Sorting: Nearest Neighbor/Reversed with. More...
 
int nearestNeighborOrigin = 0
 The initial source position when using lifetime sorting of Nearest Neighbor/Reversed and nearestNeighborOriginMethod of NEARESTNEIGHBORORIGINMETHOD.SourcePoint. This will let you sort the lifetime from a generated particle birth position. More...
 
Vector3 nearestNeighborOriginVector3
 The initial source position when using lifetime sorting of Nearest Neighbor/Reversed and nearestNeighborOriginMethod of NEARESTNEIGHBORORIGINMETHOD.Vector3. This will let you sort the lifetime from a Vector3 in world space. More...
 
Transform nearestNeighborOriginTransform
 The initial source position when using lifetime sorting of Nearest Neighbor/Reversed and nearestNeighborOriginMethod of NEARESTNEIGHBORORIGINMETHOD.Transform. This will let you sort the lifetime from a Transform's position in world space. More...
 
int particleCount
 The amount of particles within this PlaygroundParticlesC object. More...
 
float emissionRate = 1f
 The percentage to emit of particleCount in bursts from this PlaygroundParticles. More...
 
OVERFLOWMODEC overflowMode = OVERFLOWMODEC.SourceTransform
 The method to calculate Overflow Offset with. More...
 
Vector3 overflowOffset
 The offset direction and magnitude when particle count exceeds source count. More...
 
bool applySourceScatter = false
 Should source position scattering be applied? More...
 
Vector3 sourceScatterMin
 The minimum spread of source position scattering. More...
 
Vector3 sourceScatterMax
 The maximum spread of source position scattering. More...
 
Vector3 scatterScale = new Vector3(1f,1f,1f)
 The scale of source scatter. This can be changed over time to move the scattering seamlessly. More...
 
MINMAXVECTOR3METHOD sourceScatterMethod
 
SORTINGC sorting = SORTINGC.Scrambled
 Sort mode for particle lifetime. More...
 
AnimationCurve lifetimeSorting
 Custom sorting for particle lifetime (when sorting is set to Custom). More...
 
float sizeMin = 1f
 Minimum size of particles. More...
 
float sizeMax = 1f
 Maximum size of particles. More...
 
float scale = 1f
 The scale of minimum and maximum particle size. More...
 
float initialRotationMin
 Minimum initial particle rotation. More...
 
float initialRotationMax
 Maximum initial particle rotation. More...
 
float rotationSpeedMin
 Minimum amount to rotate a particle over time. More...
 
float rotationSpeedMax
 Maximum amount to rotate a particle over time. More...
 
bool rotateTowardsDirection = false
 Should the particles rotate towards their movement direction. The rotationNormal will determine from which angle the rotation is based on. More...
 
Vector3 rotationNormal = -Vector3.forward
 The rotation direction normal when rotating towards direction (always normalized value). More...
 
VALUEMETHOD lifetimeValueMethod
 The method to apply lifetime values. More...
 
float lifetime
 The maximum life of a particle in seconds. More...
 
float lifetimeMin = 0
 The minimum life of a particle when using lifetimeValueMethod of RandomBetweenTwoValues. More...
 
float lifetimeOffset
 The offset of lifetime in this particle system. More...
 
float lifetimeEmission = 1f
 The emission during lifetime. This will compress the Lifetime Sorting pattern over the total lifetime. This can be used to have particles live longer than the otherwise obvious repeating pattern. More...
 
float minShurikenLifetime = .08f
 The minimum Shuriken lifetime clamps the lifetime value for each particle. When a Shuriken particle reaches 0 it will result in being removed from screen, where a noticable flicker will occur if the particle has the same birth as death position. Upon using Texture Sheet Animation you may want this to be set to 0 if your particles has a short lifetime (below 1) to get all tiles into the animation. More...
 
bool applyLifetimeSize = true
 Should lifetime size affect each particle? More...
 
AnimationCurve lifetimeSize
 The size over lifetime of each particle. More...
 
bool applyParticleArraySize
 Should particle array size affect each particle? This will multiply the size of each particle depending on its position in the particle array. More...
 
AnimationCurve particleArraySize
 The size over particle array of each particle. This will multiply the size of each particle depending on its position in the particle array. More...
 
bool transitionBackToSource = false
 Should the particles transition back to their source position during their lifetime? Use transitionBackToSourceAmount to set the strength by a normalized AnimationCurve. More...
 
AnimationCurve transitionBackToSourceAmount
 The amount to transition back to the source position by a normalized AnimationCurve. More...
 
bool onlySourcePositioning = false
 Should the particles only position on their source (and not apply any forces)? More...
 
bool onlyLifetimePositioning = false
 Should the particles only position by lifetime positioning Vector3AnimationCurves? More...
 
Vector3AnimationCurveC lifetimePositioning
 The lifetime positioning of particles using a Vector3AnimationCurveC. This will annihilate any forces and only move particles on the X, Y and Z Animation Curves. More...
 
bool applyLifetimePositioningTimeScale = false
 Should scale over time of lifetime positioning apply? More...
 
bool applyLifetimePositioningPositionScale = false
 Should scale of position of lifetime positioning apply? More...
 
AnimationCurve lifetimePositioningTimeScale
 The scale of time for lifetime positioning. More...
 
AnimationCurve lifetimePositioningPositionScale
 The scale of positioning for lifetime positioning. More...
 
float lifetimePositioningScale = 1f
 The overall scale of lifetime positioning. More...
 
bool lifetimePositioningUsesSourceDirection = false
 Should lifetime positioning use the direction normal of the source? More...
 
bool applyLifetimeVelocity = false
 Should lifetime velocity affect particles? More...
 
Vector3AnimationCurveC lifetimeVelocity
 The velocity over lifetime of each particle. More...
 
float lifetimeVelocityScale = 1f
 The lifetime velocity scale. More...
 
bool applyInitialVelocity = false
 Should initial velocity affect particles? More...
 
Vector3 initialVelocityMin
 The minimum starting velocity of each particle. More...
 
Vector3 initialVelocityMax
 The maximum starting velocity of each particle. More...
 
MINMAXVECTOR3METHOD initialVelocityMethod
 Determines if the value of initial velocity should be rectangular or spherical. More...
 
bool applyInitialLocalVelocity = false
 Should initial local velocity affect particles? More...
 
Vector3 initialLocalVelocityMin
 The minimum starting velocity of each particle with normal or transform direction. More...
 
Vector3 initialLocalVelocityMax
 The maximum starting velocity of each particle with normal or transform direction. More...
 
MINMAXVECTOR3METHOD initialLocalVelocityMethod
 Determines if the value of initial local velocity should be rectangular or spherical. More...
 
bool applyInitialVelocityShape = false
 Should the initial velocity shape be applied on particle re/birth? More...
 
Vector3AnimationCurveC initialVelocityShape
 The amount of velocity to apply of the spawning particle's initial/local velocity in form of a Vector3AnimationCurve. More...
 
float initialVelocityShapeScale = 1f
 The scale of initial velocity shape. More...
 
bool applyVelocityBending
 Should bending affect particles velocity? More...
 
Vector3 velocityBending
 The amount to bend velocity of each particle. More...
 
VELOCITYBENDINGTYPEC velocityBendingType
 The type of velocity bending. More...
 
Vector3 gravity
 The constant force towards gravitational vector. More...
 
float maxVelocity = 100f
 The maximum positive- and negative velocity of each particle. More...
 
PlaygroundAxisConstraintsC axisConstraints = new PlaygroundAxisConstraintsC()
 The force axis constraints of each particle. More...
 
float damping
 Particles inertia over time. More...
 
float velocityScale = 1f
 The overall scale of velocity. More...
 
Gradient lifetimeColor
 The color over lifetime. More...
 
List< PlaygroundGradientClifetimeColors = new List<PlaygroundGradientC>()
 The colors over lifetime (if Color Source is set to LifetimeColors). More...
 
COLORSOURCEC colorSource = COLORSOURCEC.Source
 The source to read color from (fallback on Lifetime Color if no source color is available). More...
 
bool sourceUsesLifetimeAlpha
 Should the source color use alpha from Lifetime Color instead of the source's original alpha? More...
 
COLORMETHOD colorMethod
 The method to color particles with. Either evaluated by their lifetime or by their position in the ParticleCache array. More...
 
bool arrayColorUsesAlpha
 Determines if particles should get a secondary alpha applied from the arrayColorAlpha gradient when using colorMethod of COLORMETHOD.ParticleArray. More...
 
Gradient arrayColorAlpha
 The array color alpha. More...
 
bool applyLocalSpaceMovementCompensation = true
 Should the movement of the particle system transform when in local simulation space be compensated for? More...
 
bool applyRandomSizeOnRebirth = true
 Should particles get a new random size upon rebirth? More...
 
bool applyRandomInitialVelocityOnRebirth = true
 Should particles get a new random velocity upon rebirth? More...
 
bool applyRandomRotationOnRebirth = true
 Should particles get a new random rotation upon rebirth? More...
 
bool applyRandomScatterOnRebirth = false
 Should particles get a new scatter position upon rebirth? More...
 
bool applyInitialColorOnRebirth = false
 Should particles get their initial calculated color upon rebirth? (Can resolve flickering upon rebirth.) More...
 
bool applyRandomLifetimeOnRebirth = true
 Should particles get a new random lifetime upon rebirth? More...
 
bool applyDeltaOnRebirth = true
 Should particle birth position be adjusted with the delta time from birth to current? This will make the particles appear linearly. More...
 
bool calculateManipulatorOnRebirth = false
 Should each birthing particle calculate the local manipulators immediately? More...
 
bool pauseCalculationWhenInvisible = false
 Should the particle system pause calculation upon becoming invisible? More...
 
bool calculationTriggerSizeGizmo = false
 Should the calculation trigger size gizmo be visible in Scene View? More...
 
Transform calculationTriggerTransform
 The calculation trigger transform determines the origin of the rendered particle area. This will affect the calculation trigger when pauseCalculationWhenInvisible is set to true. More...
 
Vector3 calculationTriggerSize = new Vector3(1f,1f,1f)
 The calculation trigger size determines the size of the rendered particle area. This will affect the calculation trigger when pauseCalculationWhenInvisible is set to true. More...
 
Vector3 calculationTriggerOffset = new Vector3()
 The calculation trigger offset determines the offset from the calculationTriggerTransform position. This will affect the calculation trigger when pauseCalculationWhenInvisible is set to true. More...
 
bool forceVisibilityWhenOutOfFrustrum = true
 Should the particle system force Play() when GameObject is outside of camera view? (Fix for Shuriken stop rendering.) More...
 
bool syncPositionsOnMainThread = false
 Should each particle's position be synced with main-threaad? Use this when dealing with moving source objects or if you experience a laggy particle movement. More...
 
bool applyLockPosition = false
 Should the particle system force itself to remain in lockPosition? More...
 
bool applyLockRotation = false
 Should the particle system force itself to remain in lockRotation? More...
 
bool applyLockScale = false
 Should the particle system force itself to remain in lockScale? More...
 
bool lockPositionIsLocal = false
 The locked position is considered local. More...
 
bool lockRotationIsLocal = false
 The locked rotation is considered local. More...
 
Vector3 lockPosition = Vector3.zero
 The locked position. More...
 
Vector3 lockRotation = Vector3.zero
 The locked rotation. More...
 
Vector3 lockScale = new Vector3(1f,1f,1f)
 The locked scale. More...
 
bool applyMovementCompensationLifetimeStrength = false
 Should the movementCompensationLifetimeStrength affect local space movement compensation? More...
 
AnimationCurve movementCompensationLifetimeStrength
 The strength of movement compensation over particles lifetime More...
 
bool applyParticleMask
 Determines if masking should be applied to the particles. More...
 
int particleMask = 0
 The masked amount of particles. The particleMaskTime will determine if the particles should fade in/out. More...
 
float particleMaskTime = 0f
 The time it takes to mask in/out particles when using particleMask. More...
 
MASKSORTINGC particleMaskSorting
 The method to distribute the sorting mask when particleMask is above 0. More...
 
float stretchSpeed = 1f
 The speed of stretching to reach full effect. More...
 
bool applyStretchStartDirection = false
 Should the start direction of particle stretching be applied? More...
 
Vector3 stretchStartDirection = Vector3.zero
 The starting direction of stretching if all initial velocity is zero. More...
 
bool applyLifetimeStretching = false
 Should lifetime stretching be applied? More...
 
AnimationCurve stretchLifetime
 The lifetime stretching of stretched particles. More...
 
ThreadMethodLocal threadMethod
 The multithreading method how this particle system should calculate. Use this to bypass the Playground Manager's threadMethod. More...
 
bool multithreadedStartup = true
 Determines if multithreading should be used to initialize all caches for the particle system. The tradeoff of sparing the main thread from initializing all caches is that it can result in the particle system taking a couple of frames before it's ready to start emission. More...
 
int scriptedEmissionIndex
 When using Emit() the index will point to the next particle in pool to emit. More...
 
Vector3 scriptedEmissionPosition
 When using Emit() the passed in position will determine the position for this particle. More...
 
Vector3 scriptedEmissionVelocity
 When using Emit() the passed in velocity will determine the speed and direction for this particle. More...
 
Color scriptedEmissionColor = Color.white
 When using Emit() the passed in color will decide the color for this particle if colorSource is set to COLORSOURCEC.Source. More...
 
bool collision = false
 Determines if particles can collide. Enable this if you want particles to continuously look for colliders of type collisionType (2D/3D). Particle collision will run on main-thread. More...
 
bool affectRigidbodies = true
 Should particles affect rigidbodies? The mass determines how much they will affect the rigidobdy. More...
 
bool inverseRigidbodyCollision = false
 
float mass = .01f
 The mass of a particle (calculated in collision with rigidbodies). More...
 
float collisionRadius = 1f
 The spherical radius of a particle used upon collision. More...
 
LayerMask collisionMask
 The layers these particles will collide with. More...
 
List< TransformcollisionExclusion
 
float lifetimeLoss = 0f
 The amount a particle will loose of its lifetime on collision. More...
 
float bounciness = .5f
 The amount a particle will bounce on collision. More...
 
Vector3 bounceRandomMin
 The minimum amount of random bounciness (seen as negative offset from the collided surface's normal direction). More...
 
Vector3 bounceRandomMax
 The maximum amount of random bounciness (seen as positive offset from the collided surface's normal direction). More...
 
List< PlaygroundColliderCcolliders
 The Playground Colliders of this particle system. A Playground Collider is an infinite collision plane based on a Transform in the scene. More...
 
COLLISIONTYPEC collisionType
 The type of collision. This determines if 2D- or 3D raycasting should be used. More...
 
float minCollisionDepth = 0f
 Minimum collision depth of Raycast2D. More...
 
float maxCollisionDepth = 0f
 Maximum collision depth of Raycast2D. More...
 
bool stickyCollisions = false
 Determines if particles should stick to their collided surface. More...
 
float stickyCollisionsSurfaceOffset = 0
 The sticky collisions offset from the collided surface normal. More...
 
LayerMask stickyCollisionsMask = -1
 
bool collisionPrecision = false
 Determines if collisions should be calculated using Vector3.Distance (if set to true) or Vector3.SqrMagnitude (if set to false). More...
 
bool forceCollisionCaching = false
 Determines if collisions should be cached even if stickyCollisions isn't set to true. Enable this if you want to extend your scripts upon the collision information for the particles when not using sticky collisions. Having this disabled will minimize transform component lookups during collisions. More...
 
bool maskedParticlesBypassCollision = true
 
List< ParticleStateCstates = new List<ParticleStateC>()
 The list of States for this PlaygroundParticles. A State is Source data from a texture or mesh which determines where particles will be positioned upon birth. More...
 
List< PlaygroundSplinesplines
 The splines used as Source. Particle birth positions will populate along the spline using the list of particles as normalized time on the curves of the spline. To offset the time use splineTimeOffset. More...
 
float splineTimeOffset
 
bool treatAsOneSpline
 
WorldObject worldObject = new WorldObject()
 A mesh as source calculated within the scene. More...
 
SkinnedWorldObject skinnedWorldObject = new SkinnedWorldObject()
 A skinned mesh as source calculated within the scene. More...
 
bool forceSkinnedMeshUpdateOnMainThread = false
 
Transform sourceTransform
 A transform calculated within the scene. More...
 
List< PlaygroundTransformCsourceTransforms
 
bool treatAsOneTransform
 
PlaygroundParticlesC otherParticleSource
 
SOURCEBIRTHMETHOD otherParticleSourceMethod
 
PaintObjectC paint
 The paint source of this PlaygroundParticles. More...
 
ParticleProjectionC projection
 The projection source of this PlaygroundParticles. More...
 
List< ManipulatorObjectCmanipulators
 The list of Local Manipulator Objects handled by this PlaygroundParticlesC object. More...
 
List< PlaygroundEventCevents
 List of event objects handled by this PlaygroundParticlesC object. More...
 
PlaygroundCache playgroundCache = new PlaygroundCache()
 Data for each particle. More...
 
ParticleSystem.Particle[] particleCache
 The particle pool. More...
 
CollisionCache collisionCache
 
List< PlaygroundSavesnapshots = new List<PlaygroundSave>()
 Saved data of properties (positions, velocities, colors etc.). More...
 
bool loadFromStart = false
 Should the particle system load stored data from start? More...
 
int loadFrom = 0
 Which data should be loaded (if loadFromStart is true). More...
 
bool loadTransition = false
 Should a transition occur whenever a Load is issued? More...
 
TRANSITIONTYPEC loadTransitionType
 The type of transition to occur whenever a Load is issued. More...
 
float loadTransitionTime = 1f
 The time for load transition in seconds. More...
 
PlaygroundCache snapshotData
 The storage of position data if this is a snapshot. More...
 
float timeOfSnapshot = 0
 The global time the snapshot was made. More...
 
bool isSnapshot = false
 Is this particle system a snapshot? More...
 
ParticleSystem shurikenParticleSystem
 This ParticleSystem (Shuriken) component. More...
 
int particleSystemId
 The id of this PlaygroundParticlesC object. More...
 
GameObject particleSystemGameObject
 The GameObject of a PlaygroundParticlesC object. More...
 
Transform particleSystemTransform
 The Transform of a PlaygroundParticlesC object. More...
 
Renderer particleSystemRenderer
 The Renderer of a PlaygroundParticlesC object. More...
 
ParticleSystemRenderer particleSystemRenderer2
 The ParticleSystemRenderer of a PlaygroundParticlesC object. More...
 
List< PlaygroundParticlesCeventControlledBy = new List<PlaygroundParticlesC>()
 The PlaygroundParticlesC that is controlling this particle system. More...
 
TURBULENCETYPE turbulenceType = TURBULENCETYPE.None
 The type of turbulence. More...
 
float turbulenceStrength = 10f
 The turbulence strength. More...
 
float turbulenceScale = 1f
 The turbulence resolution scale. A higher value will generate a more dense grid. More...
 
float turbulenceTimeScale = 1f
 The turbulence time scale. More...
 
bool turbulenceApplyLifetimeStrength = false
 Should Turbulence Lifetime Strength apply? More...
 
AnimationCurve turbulenceLifetimeStrength
 The Turbulence Lifetime Strength. Use this to control how much turbulence will affect the particle over its lifetime. More...
 
bool prewarm = false
 
float prewarmTime = 1f
 
int prewarmCycles = 16
 
float particleTimescale = 1f
 The simulation time scale for all particles within this system. Set time scale to 0 to pause a particle system. More...
 
bool cameFromNonCalculatedFrame = false
 
bool cameFromNonEmissionFrame = true
 
float localTime = 0f
 
float localDeltaTime = 0f
 
int previousActiveState
 
float simulationStarted
 
bool inPlayback = false
 
bool loopExceeded = false
 
int loopExceededOnParticle
 
bool isReadyForThreadedCalculations = false
 
bool hasActiveParticles = true
 
bool isDoneThread = true
 
bool threadHadNoActiveParticles = false
 

Properties

bool IsDoneThread [get, set]
 
float LastTimeUpdated [get, set]
 Gets or sets when this particle system was last time updated. This is done automatically while the particle system is simulated. More...
 
float LocalDeltaTime [get, set]
 Gets or sets the local delta time of this particle system. This is done automatically while the particle system is simulated. More...
 

Detailed Description

The PlaygroundParticlesC class is a Particle Playground system driven by the Playground Manager (PlaygroundC). A Particle Playground system contains settings and data for altering a Shuriken component.

Member Function Documentation

static void ParticlePlayground.PlaygroundParticlesC.CalculateManipulator ( PlaygroundParticlesC  playgroundParticles,
ManipulatorObjectC  thisManipulator,
int  p,
float  t,
float  life,
Vector3  particlePosition,
Vector3  manipulatorPosition,
bool  localSpace 
)
static

Calculates the effect from a Manipulator.

Parameters
playgroundParticlesPlayground particles.
thisManipulatorThis manipulator.
pParticle index.
tDelta time.
lifeLifetime.
particlePositionParticle position.
manipulatorPositionManipulator position.
manipulatorDistanceManipulator distance.
localSpaceIs calculation in local space?
void ParticlePlayground.PlaygroundParticlesC.ClearCollisions ( )

Clears the collisions. Use this if you for example want to toggle between sticky and non-sticky particle behaviors.

void ParticlePlayground.PlaygroundParticlesC.ClearCollisions ( int  index)

Clears the collisions at index. Use this if you for example want to toggle between sticky and non-sticky particle behaviors.

static void ParticlePlayground.PlaygroundParticlesC.Collisions ( PlaygroundParticlesC  playgroundParticles)
static

Calculates particle collisions, this runs automatically if collision is set to true. (Must currently run on main-thread due to the Physics.Raycast dependency.)

Parameters
playgroundParticlesParticle Playground system.
void ParticlePlayground.PlaygroundParticlesC.CopySaveDataTo ( PlaygroundParticlesC  playgroundParticles)

Copies stored data of Snapshots into a particle system (separated from CopyTo() to solve Save/Load overwrite paradox).

Parameters
playgroundParticlesPlayground particles.
void ParticlePlayground.PlaygroundParticlesC.CopyTo ( PlaygroundParticlesC  playgroundParticles)

Clones the settings of this Particle Playground system into the passed reference. Note that you additionally need to use CopySaveDataTo() if you want to clone the Snapshots.

Parameters
playgroundParticlesPlayground particles.
static PlaygroundParticlesC ParticlePlayground.PlaygroundParticlesC.CreateParticleObject ( string  name,
Vector3  position,
Quaternion  rotation,
float  particleSize,
Material  material 
)
static

Creates a Shuriken Particle System.

Returns
The particle object.
Parameters
nameName.
positionPosition.
rotationRotation.
particleSizeParticle size.
materialMaterial.
static PlaygroundParticlesC ParticlePlayground.PlaygroundParticlesC.CreatePlaygroundParticles ( Texture2D[]  images,
string  name,
Vector3  position,
Quaternion  rotation,
Vector3  offset,
float  particleSize,
float  scale,
Material  material 
)
static

Creates a new PlaygroundParticlesC object.

Returns
The playground particles.
Parameters
imagesImages.
nameName.
positionPosition.
rotationRotation.
offsetOffset.
particleSizeParticle size.
scaleScale.
materialMaterial.
void ParticlePlayground.PlaygroundParticlesC.Emit ( bool  setEmission)

Sets emission On or Off.

Parameters
setEmissionIf set to true then emit particles.
int ParticlePlayground.PlaygroundParticlesC.Emit ( )

Emits a single particle at previously set scripted emission position, velocity and color.

int ParticlePlayground.PlaygroundParticlesC.Emit ( Vector3  givePosition)

Emits a single particle at position with previously set scripted emission velocity and color.

Parameters
givePositionPosition.
int ParticlePlayground.PlaygroundParticlesC.Emit ( Vector3  givePosition,
Vector3  giveVelocity 
)

Emits a single particle at position with velocity, the color will be set from the previous scripted emission color.

Parameters
givePositionPosition.
giveVelocityVelocity.
int ParticlePlayground.PlaygroundParticlesC.Emit ( Vector3  givePosition,
Vector3  giveVelocity,
Color32  giveColor 
)

Emits a single particle at position with velocity and color (Source Mode SOURCEC.Script will be automatically set).

Parameters
givePositionPosition.
giveVelocityVelocity.
giveColorColor.
void ParticlePlayground.PlaygroundParticlesC.Emit ( int  quantity)

Emits number of particles set by quantity. All other values will be set from the previous scripted emission call (or as set in Inspector).

Parameters
quantityQuantity.
void ParticlePlayground.PlaygroundParticlesC.Emit ( int  quantity,
Vector3  givePosition,
Vector3  randomVelocityMin,
Vector3  randomVelocityMax,
Color32  giveColor 
)

Emits number of particles set by quantity, position and minimum - maximum random velocity.

Parameters
quantityQuantity.
givePositionPosition.
randomVelocityMinRandom minimum velocity.
randomVelocityMaxRandom maximum velocity.
giveColorColor.
void ParticlePlayground.PlaygroundParticlesC.Emit ( int  quantity,
Vector3  randomPositionMin,
Vector3  randomPositionMax,
Vector3  randomVelocityMin,
Vector3  randomVelocityMax,
Color32  giveColor 
)

Emits number of particles set by quantity, minimum - maximum random position and velocity.

Parameters
quantityQuantity.
randomPositionMinRandom position minimum.
randomPositionMaxRandom position max.
randomVelocityMinRandom velocity minimum.
randomVelocityMaxRandom velocity max.
giveColorColor.
int ParticlePlayground.PlaygroundParticlesC.Emit ( float  giveLifetime)

Emits a single particle with specified lifetime. This will set particle position, velocity and color from previously called emission (as set in the Source tab).

Parameters
giveLifetimeLifetime.
int ParticlePlayground.PlaygroundParticlesC.Emit ( Vector3  givePosition,
float  giveLifetime 
)

Emits a single particle with specified lifetime. This will set particle velocity and color from previously called emission (as set in the Source tab).

Parameters
givePositionPosition.
giveLifetimeLifetime.
int ParticlePlayground.PlaygroundParticlesC.Emit ( Vector3  givePosition,
Vector3  giveVelocity,
float  giveLifetime 
)

Emits a single particle with specified lifetime. This will set particle color from previously called emission (as set in the Source tab).

Parameters
givePositionPosition.
giveVelocityVelocity.
giveLifetimeLifetime.
int ParticlePlayground.PlaygroundParticlesC.Emit ( Vector3  givePosition,
Vector3  giveVelocity,
float  giveLifetime,
Color32  giveColor 
)

Emits a single particle with specified position, velocity, lifetime and color.

Parameters
givePositionPosition.
giveVelocityVelocity.
giveLifetimeLifetime.
giveColorColor.
Vector3 ParticlePlayground.PlaygroundParticlesC.GetCollisionNormal ( int  index)

Gets the particle collision normal at index.

Returns
The particle collision normal.
Parameters
indexIndex.
Vector3 ParticlePlayground.PlaygroundParticlesC.GetCollisionPosition ( int  index)

Gets the particle collision position at index.

Returns
The particle collision position.
Parameters
indexIndex.
Transform ParticlePlayground.PlaygroundParticlesC.GetCollisionTransform ( int  index)

Gets the particle collision transform at index.

Returns
The particle collision transform.
Parameters
indexIndex.
float ParticlePlayground.PlaygroundParticlesC.GetDeltaTime ( )

Gets the current delta time of a particle system's update loop.

Returns
The delta time.
int ParticlePlayground.PlaygroundParticlesC.GetLayer ( )

Gets the layer this particle system is within. This is safe to call from another thread.

Returns
The layer.
static Vector3 ParticlePlayground.PlaygroundParticlesC.GetOverflow2 ( Vector3  overflow,
int  currentVal,
int  maxVal 
)
static

Returns the offset as a remainder from a point, constructed for multithreading.

Returns
The overflow position.
Parameters
overflowOverflow by Vector3.
currentValCurrent value.
maxValMax value.
static Vector3 ParticlePlayground.PlaygroundParticlesC.GetOverflow2 ( Vector3  overflow,
Vector3  direction,
int  currentVal,
int  maxVal 
)
static

Returns the offset with direction as a remainder from a point, constructed for multithreading.

Returns
The overflow position in direction.
Parameters
overflowOverflow by Vector3.
directionDirection.
currentValCurrent value.
maxValMax value.
Vector3 ParticlePlayground.PlaygroundParticlesC.GetParticlePosition ( int  p)

Gets the particle position.

Returns
The particle position.
Parameters
pParticle index.
SimplexNoise ParticlePlayground.PlaygroundParticlesC.GetSimplex ( )

Gets the running simplex algorithm.

Returns
The running simplex algorithm.
int ParticlePlayground.PlaygroundParticlesC.GetSplineIndex ( )

Gets the index of the source spline which currently is read in simulation.

Returns
The spline index.
Vector3 ParticlePlayground.PlaygroundParticlesC.GetStickyPosition ( int  index)

Gets the particle sticky position at index. Note that stickyCollisions must be enabled to return expected values.

Returns
The particle sticky position.
Parameters
indexIndex.
int ParticlePlayground.PlaygroundParticlesC.GetTransformIndex ( )

Gets the index of the source transform which currently is read in simulation.

Returns
The transform index.
bool ParticlePlayground.PlaygroundParticlesC.HasCollided ( int  index)

Determines if a particle at specified index has collided during its lifetime.

Returns
true if the particle at index has collided during its lifetime; otherwise, false.
Parameters
indexIndex.
bool ParticlePlayground.PlaygroundParticlesC.HasCollisionCache ( )

Determines whether this particle system has an initialized collision cache.

Returns
true if this particle system has a collision cache; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.HasGlobalManipulator ( )

Determines whether this particle system may be affected by one or more available Global Manipulators.

Returns
true if this particle system will be affected by one or more Global Manipulators; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.HasOverflow ( )

Determines whether this particle system has overflow set by Overflow Offset.

Returns
true if this particle system has overflow; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.HasSeveralManipulatorEvents ( )

Determines whether this particle system has several manipulator events.

Returns
true if this particle system has several manipulator events; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.HasTurbulence ( )

Determines whether this particle system has turbulence active.

Returns
true if this particle system has turbulence; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.Initialized ( )

Check if the particle system is ready. You should wait for Initialized() to become true before calling any scripted emission.

Returns
true if the particle system is ready; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.InTransition ( )

Determines if this particle system is in a transition.

Returns
true, if transition is active, false otherwise.
bool ParticlePlayground.PlaygroundParticlesC.IsAlive ( )

Checks if particles are still in simulation.

Returns
true if this particle system is alive; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsLoading ( )

Determines whether this particle system is loading a snapshot.

Returns
true if this particle system is loading a snapshot; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsLocalSpace ( )

Determines whether this particle system is simulated in local space.

Returns
true if this particle system is simulated in local space; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsParticleInsideManipulator ( int  particleId,
ManipulatorObjectC  manipulator 
)

Determines whether a particle is inside the area of a Manipulator.

Returns
true if this particle is inside manipulator; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsPrewarming ( )

Determines whether this particle system is currently prewarming.

Returns
true if this particle system is prewarming; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsReady ( )

Check if the particle system is ready. You should wait for IsReady() to become true before calling any scripted emission. This returns the same result as calling Initialized().

Returns
true if the particle system is ready; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsReportingBadUpdateRate ( )

Determines whether this particle system is reporting bad update rate. You will also see the "P" icon indicator in the Hierarchy turn red in Play Mode whenever this returns true.

Returns
true if this particle system is reporting bad update rate; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsSaving ( )

Determines whether this particle system is saving a snapshot.

Returns
true if this particle system is saving a snapshot; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsSettingLifetime ( )

Determines whether this particle system is currently setting the lifetime. As the particle system may run on a second thread this can be used to wait until it is ready to simulate.

Returns
true if this particle system is setting the lifetime; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsSkinnedWorldObjectReady ( )

Determines whether the skinned world object is ready.

Returns
true if this skinned world object is ready; otherwise, false.
bool ParticlePlayground.PlaygroundParticlesC.IsYieldRefreshing ( )

Determines whether this particle system is yield refreshing.

Returns
true if this particle system is yield refreshing; otherwise, false.
void ParticlePlayground.PlaygroundParticlesC.Kill ( int  p)

Kill the specified particle.

Parameters
pIndex of particle.
void ParticlePlayground.PlaygroundParticlesC.KillAndSendManipulatorDeathEvents ( int  p)

Kill the specified particle and send death events to all Manipulators tracking particles.

Parameters
pIndex of particle.
void ParticlePlayground.PlaygroundParticlesC.Load ( int  loadPointer)

Load from a saved data state (Snapshot) using an int.

Parameters
loadPointerLoad pointer.
void ParticlePlayground.PlaygroundParticlesC.Load ( string  loadName)

Load from a saved data state (Snapshot) using a string.

Parameters
loadNameLoad name.
void ParticlePlayground.PlaygroundParticlesC.LoadAndApplyMask ( int  loadPointer,
int  loadMask 
)

Load from a saved data state (Snapshot) and apply a mask to hide specified particles. The mask sorting will be determined by the loading snapshot's mask settings.

Parameters
loadPointerThe Snapshot you wish to load.
loadMaskThe amount of masked particles in the particle array.
static ManipulatorObjectC ParticlePlayground.PlaygroundParticlesC.NewManipulatorObject ( MANIPULATORTYPEC  type,
LayerMask  affects,
Transform  manipulatorTransform,
float  size,
float  strength,
PlaygroundParticlesC  playgroundParticles 
)
static

Creates a new ManipulatorObject and attach to the Playground Manager.

Returns
The manipulator object.
Parameters
typeType.
affectsAffects.
manipulatorTransformManipulator transform.
sizeSize.
strengthStrength.
playgroundParticlesPlayground particles.
static PaintObjectC ParticlePlayground.PlaygroundParticlesC.NewPaintObject ( PlaygroundParticlesC  playgroundParticles)
static

Creates a new PaintObject.

Returns
The paint object.
Parameters
playgroundParticlesPlayground particles.
static ParticleProjectionC ParticlePlayground.PlaygroundParticlesC.NewProjectionObject ( PlaygroundParticlesC  playgroundParticles)
static

Creates a new ParticleProjection object.

Returns
The projection object.
Parameters
playgroundParticlesPlayground particles.
static SkinnedWorldObject ParticlePlayground.PlaygroundParticlesC.NewSkinnedWorldObject ( Transform  meshTransform)
static

Creates a new SkinnedWorldObject.

Returns
The skinned world object.
Parameters
meshTransformMesh transform.
static SkinnedWorldObject ParticlePlayground.PlaygroundParticlesC.NewSkinnedWorldObject ( Transform  meshTransform,
int  downResolution 
)
static

Creates a new SkinnedWorldObject with pre-set down resolution.

Returns
The skinned world object.
Parameters
meshTransformMesh transform.
downResolutionDown resolution.
static WorldObject ParticlePlayground.PlaygroundParticlesC.NewWorldObject ( Transform  meshTransform)
static

Creates a new WorldObject.

Returns
The world object.
Parameters
meshTransformMesh transform.
bool ParticlePlayground.PlaygroundParticlesC.NoForce ( int  p)

Determines if the particle have noForce set to true

Returns
true, if force is disabled, false otherwise.
Parameters
pIndex of particle.
static void ParticlePlayground.PlaygroundParticlesC.OnCreatePlaygroundParticles ( PlaygroundParticlesC  playgroundParticles)
static

Sets default settings for a PlaygroundParticlesC object.

Parameters
playgroundParticlesPlayground particles.
void ParticlePlayground.PlaygroundParticlesC.ParticleColor ( int  p,
Color32  color 
)

Sets the color of the specified particle.

Parameters
pParticle index.
colorColor.
void ParticlePlayground.PlaygroundParticlesC.ParticlePosition ( int  p,
Vector3  position 
)

Positions the specified particle.

Parameters
pParticle index.
positionPosition.
void ParticlePlayground.PlaygroundParticlesC.ParticleSize ( int  p,
float  size 
)

Sets the size of the specified particle.

Parameters
pParticle index.
sizeSize.
void ParticlePlayground.PlaygroundParticlesC.ParticleVelocity ( int  p,
Vector3  velocity 
)

Sets the velocity of the specified particle.

Parameters
pParticle index.
sizeVelocity.
void ParticlePlayground.PlaygroundParticlesC.PositionToInverseTransformPoint ( int  p,
Vector3  position,
Transform  targetTransform 
)

Positions to inverse transform point.

Parameters
pParticle index.
positionPosition.
targetTransformTarget transform.
void ParticlePlayground.PlaygroundParticlesC.PositionToTransformPoint ( int  p,
Vector3  position,
Transform  targetTransform 
)

Positions to transform point.

Parameters
pParticle index.
positionPosition.
targetTransformTarget transform.
bool ParticlePlayground.PlaygroundParticlesC.PrepareThreadedCalculations ( )

Prepares all values for calculation which is not thread-safe.

Returns
true, if threaded calculations was prepared, false otherwise.
static void ParticlePlayground.PlaygroundParticlesC.PropertyManipulator ( PlaygroundParticlesC  playgroundParticles,
ManipulatorObjectC  thisManipulator,
ManipulatorPropertyC  thisManipulatorProperty,
float  manipulatorStrength,
int  p,
float  t,
Vector3  particlePosition,
Vector3  manipulatorPosition,
float  manipulatorDistance,
bool  localSpace,
bool  contains 
)
static

Calculates the effect from Manipulator's properties.

Parameters
playgroundParticlesPlayground particles.
thisManipulatorThis manipulator.
thisManipulatorPropertyThis manipulator property.
pParticle index.
tDelta time.
particlePositionParticle position.
manipulatorPositionManipulator position.
localSpaceIs calculation in local space?
containsDoes the Manipulator contain the particle at index?
void ParticlePlayground.PlaygroundParticlesC.ProtectParticleFromManipulator ( int  particle,
ManipulatorObjectC  manipulator 
)

Protects the particle from specified manipulator.

Parameters
particleParticle index.
manipulatorManipulator.
static float ParticlePlayground.PlaygroundParticlesC.RandomRange ( System.Random  random,
float  min,
float  max 
)
static

Returns a random range float, adapted for threading.

Returns
The range.
Parameters
randomRandom.
minMinimum.
maxMax.
static Vector3 ParticlePlayground.PlaygroundParticlesC.RandomRange ( System.Random  random,
Vector3  min,
Vector3  max 
)
static

Random range Vector3 adapted for threading. This produces a rectangular random position inside min to max. Should you want spherical distribution use RandomRangeSpherical instead.

Returns
The range.
Parameters
randomRandom.
minMinimum.
maxMax.
static Vector3 ParticlePlayground.PlaygroundParticlesC.RandomRangeSpherical ( System.Random  random,
float  min,
float  max 
)
static

Spherical random range Vector3, adapted for threading.

Returns
The spherical random range.
Parameters
randomRandom.
minMinimum.
maxMax.
void ParticlePlayground.PlaygroundParticlesC.RefreshMaskSorting ( )

Refreshes the mask sorting. If you're using a particleMaskSorting of MASKSORTINGC.Scrambled you can use this to randomize new mask positions.

void ParticlePlayground.PlaygroundParticlesC.RefreshMaskSorting ( int[]  maskSortingArray)

Refresh the mask sorting by sending in a custom int[] array. The passed in maskSortingArray should contain all numbers from 0 to particleCount-1, it will then apply non-linear masking depending on the order of the numbers in releation to the actual particle array.

Parameters
maskSortingArrayMask sorting array.
void ParticlePlayground.PlaygroundParticlesC.RemoveParticleProtection ( int  particle)

Removes the particle protection.

Parameters
particleParticle index.
void ParticlePlayground.PlaygroundParticlesC.Save ( )

Store the current state of a particle system as a Snapshot.

void ParticlePlayground.PlaygroundParticlesC.Save ( string  saveName)

Store the current state of a particle system as a Snapshot and name it.

Parameters
saveNameSave name.
static void ParticlePlayground.PlaygroundParticlesC.SendDeathEvents ( PlaygroundParticlesC  playgroundParticles,
int  p 
)
static

Sends the death events.

Parameters
playgroundParticlesPlayground particles.
pParticle index.
void ParticlePlayground.PlaygroundParticlesC.SetNoForce ( int  p,
bool  noForce 
)

Sets a particle to no longer respond to forces.

Parameters
pIndex of particle.
noForceIf set to true then disable force for the particle at index.
void ParticlePlayground.PlaygroundParticlesC.SetRandomSeed ( int  seed)

Sets the random seed for the internal System.Random.

Parameters
seedSeed.
void ParticlePlayground.PlaygroundParticlesC.SetSticky ( int  index,
Vector3  position,
Vector3  normal,
float  offset,
Transform  parent 
)

Sets the particle at index to stick onto a parent transform.

Parameters
indexIndex.
positionPosition.
normalNormal.
parentParent.
static void ParticlePlayground.PlaygroundParticlesC.ThreadedCalculations ( PlaygroundParticlesC  playgroundParticles)
static

Asynchronous-friendly particle calculation routine.

void ParticlePlayground.PlaygroundParticlesC.ThreadSafeEmit ( Vector3  givePosition,
Vector3  giveVelocity,
Color32  giveColor 
)

Thread-safe version of Emit().

Parameters
givePositionPosition.
giveVelocityVelocity.
giveColorColor.
void ParticlePlayground.PlaygroundParticlesC.Translate ( int  p,
Vector3  translation 
)

Translate the specified particle

Parameters
pParticle index.
translationTranslation.
void ParticlePlayground.PlaygroundParticlesC.UpdateShuriken ( )

Updates the Shuriken component. This sets all particles previously calculated and syncs particle positioning if syncPositionsOnMainThread is true.

void ParticlePlayground.PlaygroundParticlesC.UpdateSticky ( int  index)

Updates the sticky particle position.

Parameters
indexIndex.
bool ParticlePlayground.PlaygroundParticlesC.UpdateSystem ( )

Updates a PlaygroundParticlesC object (called each calculation step from PlaygroundC).

static Vector3 ParticlePlayground.PlaygroundParticlesC.Vector3Scale ( Vector3  v1,
Vector3  v2 
)
static

Multiplies two Vector3.

Returns
The scale of two Vector3.
Parameters
v1First Vector3.
v2Second Vector3.

Member Data Documentation

int ParticlePlayground.PlaygroundParticlesC.activeState

Current active state (when using state as source).

bool ParticlePlayground.PlaygroundParticlesC.affectRigidbodies = true

Should particles affect rigidbodies? The mass determines how much they will affect the rigidobdy.

bool ParticlePlayground.PlaygroundParticlesC.applyDeltaOnRebirth = true

Should particle birth position be adjusted with the delta time from birth to current? This will make the particles appear linearly.

bool ParticlePlayground.PlaygroundParticlesC.applyInitialColorOnRebirth = false

Should particles get their initial calculated color upon rebirth? (Can resolve flickering upon rebirth.)

bool ParticlePlayground.PlaygroundParticlesC.applyInitialLocalVelocity = false

Should initial local velocity affect particles?

bool ParticlePlayground.PlaygroundParticlesC.applyInitialVelocity = false

Should initial velocity affect particles?

bool ParticlePlayground.PlaygroundParticlesC.applyInitialVelocityShape = false

Should the initial velocity shape be applied on particle re/birth?

bool ParticlePlayground.PlaygroundParticlesC.applyLifetimePositioningPositionScale = false

Should scale of position of lifetime positioning apply?

bool ParticlePlayground.PlaygroundParticlesC.applyLifetimePositioningTimeScale = false

Should scale over time of lifetime positioning apply?

bool ParticlePlayground.PlaygroundParticlesC.applyLifetimeSize = true

Should lifetime size affect each particle?

bool ParticlePlayground.PlaygroundParticlesC.applyLifetimeStretching = false

Should lifetime stretching be applied?

bool ParticlePlayground.PlaygroundParticlesC.applyLifetimeVelocity = false

Should lifetime velocity affect particles?

bool ParticlePlayground.PlaygroundParticlesC.applyLocalSpaceMovementCompensation = true

Should the movement of the particle system transform when in local simulation space be compensated for?

bool ParticlePlayground.PlaygroundParticlesC.applyLockPosition = false

Should the particle system force itself to remain in lockPosition?

bool ParticlePlayground.PlaygroundParticlesC.applyLockRotation = false

Should the particle system force itself to remain in lockRotation?

bool ParticlePlayground.PlaygroundParticlesC.applyLockScale = false

Should the particle system force itself to remain in lockScale?

bool ParticlePlayground.PlaygroundParticlesC.applyMovementCompensationLifetimeStrength = false

Should the movementCompensationLifetimeStrength affect local space movement compensation?

bool ParticlePlayground.PlaygroundParticlesC.applyParticleArraySize

Should particle array size affect each particle? This will multiply the size of each particle depending on its position in the particle array.

bool ParticlePlayground.PlaygroundParticlesC.applyParticleMask

Determines if masking should be applied to the particles.

bool ParticlePlayground.PlaygroundParticlesC.applyRandomInitialVelocityOnRebirth = true

Should particles get a new random velocity upon rebirth?

bool ParticlePlayground.PlaygroundParticlesC.applyRandomLifetimeOnRebirth = true

Should particles get a new random lifetime upon rebirth?

bool ParticlePlayground.PlaygroundParticlesC.applyRandomRotationOnRebirth = true

Should particles get a new random rotation upon rebirth?

bool ParticlePlayground.PlaygroundParticlesC.applyRandomScatterOnRebirth = false

Should particles get a new scatter position upon rebirth?

bool ParticlePlayground.PlaygroundParticlesC.applyRandomSizeOnRebirth = true

Should particles get a new random size upon rebirth?

bool ParticlePlayground.PlaygroundParticlesC.applySourceScatter = false

Should source position scattering be applied?

bool ParticlePlayground.PlaygroundParticlesC.applyStretchStartDirection = false

Should the start direction of particle stretching be applied?

bool ParticlePlayground.PlaygroundParticlesC.applyVelocityBending

Should bending affect particles velocity?

Gradient ParticlePlayground.PlaygroundParticlesC.arrayColorAlpha

The array color alpha.

bool ParticlePlayground.PlaygroundParticlesC.arrayColorUsesAlpha

Determines if particles should get a secondary alpha applied from the arrayColorAlpha gradient when using colorMethod of COLORMETHOD.ParticleArray.

PlaygroundAxisConstraintsC ParticlePlayground.PlaygroundParticlesC.axisConstraints = new PlaygroundAxisConstraintsC()

The force axis constraints of each particle.

Vector3 ParticlePlayground.PlaygroundParticlesC.bounceRandomMax

The maximum amount of random bounciness (seen as positive offset from the collided surface's normal direction).

Vector3 ParticlePlayground.PlaygroundParticlesC.bounceRandomMin

The minimum amount of random bounciness (seen as negative offset from the collided surface's normal direction).

float ParticlePlayground.PlaygroundParticlesC.bounciness = .5f

The amount a particle will bounce on collision.

bool ParticlePlayground.PlaygroundParticlesC.calculate = true

Determins if this particle system should calculate (can be overrided by PlaygroundC.calculate). This will automatically enable/disable when pauseCalculationWhenInvisible is set to true.

bool ParticlePlayground.PlaygroundParticlesC.calculateDeltaMovement = true

Calculate the delta movement force of this particle system.

bool ParticlePlayground.PlaygroundParticlesC.calculateManipulatorOnRebirth = false

Should each birthing particle calculate the local manipulators immediately?

Vector3 ParticlePlayground.PlaygroundParticlesC.calculationTriggerOffset = new Vector3()

The calculation trigger offset determines the offset from the calculationTriggerTransform position. This will affect the calculation trigger when pauseCalculationWhenInvisible is set to true.

Vector3 ParticlePlayground.PlaygroundParticlesC.calculationTriggerSize = new Vector3(1f,1f,1f)

The calculation trigger size determines the size of the rendered particle area. This will affect the calculation trigger when pauseCalculationWhenInvisible is set to true.

bool ParticlePlayground.PlaygroundParticlesC.calculationTriggerSizeGizmo = false

Should the calculation trigger size gizmo be visible in Scene View?

Transform ParticlePlayground.PlaygroundParticlesC.calculationTriggerTransform

The calculation trigger transform determines the origin of the rendered particle area. This will affect the calculation trigger when pauseCalculationWhenInvisible is set to true.

bool ParticlePlayground.PlaygroundParticlesC.clearParticlesOnEmissionStop = false

Should particles be removed instantly when you set emit to false?

List<PlaygroundColliderC> ParticlePlayground.PlaygroundParticlesC.colliders

The Playground Colliders of this particle system. A Playground Collider is an infinite collision plane based on a Transform in the scene.

bool ParticlePlayground.PlaygroundParticlesC.collision = false

Determines if particles can collide. Enable this if you want particles to continuously look for colliders of type collisionType (2D/3D). Particle collision will run on main-thread.

LayerMask ParticlePlayground.PlaygroundParticlesC.collisionMask

The layers these particles will collide with.

bool ParticlePlayground.PlaygroundParticlesC.collisionPrecision = false

Determines if collisions should be calculated using Vector3.Distance (if set to true) or Vector3.SqrMagnitude (if set to false).

float ParticlePlayground.PlaygroundParticlesC.collisionRadius = 1f

The spherical radius of a particle used upon collision.

COLLISIONTYPEC ParticlePlayground.PlaygroundParticlesC.collisionType

The type of collision. This determines if 2D- or 3D raycasting should be used.

COLORMETHOD ParticlePlayground.PlaygroundParticlesC.colorMethod

The method to color particles with. Either evaluated by their lifetime or by their position in the ParticleCache array.

COLORSOURCEC ParticlePlayground.PlaygroundParticlesC.colorSource = COLORSOURCEC.Source

The source to read color from (fallback on Lifetime Color if no source color is available).

float ParticlePlayground.PlaygroundParticlesC.damping

Particles inertia over time.

float ParticlePlayground.PlaygroundParticlesC.deltaMovementStrength = 10f

The strength to multiply delta movement with.

bool ParticlePlayground.PlaygroundParticlesC.disableOnDone = false

Should the GameObject of this PlaygroundParticlesC disable when not looping?

ONDONE ParticlePlayground.PlaygroundParticlesC.disableOnDoneRoutine

The routine that should run when particle simulation has ended.

float ParticlePlayground.PlaygroundParticlesC.emissionRate = 1f

The percentage to emit of particleCount in bursts from this PlaygroundParticles.

bool ParticlePlayground.PlaygroundParticlesC.emit = true

If emission of particles is active on this PlaygroundParticles.

List<PlaygroundParticlesC> ParticlePlayground.PlaygroundParticlesC.eventControlledBy = new List<PlaygroundParticlesC>()

The PlaygroundParticlesC that is controlling this particle system.

List<PlaygroundEventC> ParticlePlayground.PlaygroundParticlesC.events

List of event objects handled by this PlaygroundParticlesC object.

bool ParticlePlayground.PlaygroundParticlesC.forceCollisionCaching = false

Determines if collisions should be cached even if stickyCollisions isn't set to true. Enable this if you want to extend your scripts upon the collision information for the particles when not using sticky collisions. Having this disabled will minimize transform component lookups during collisions.

bool ParticlePlayground.PlaygroundParticlesC.forceVisibilityWhenOutOfFrustrum = true

Should the particle system force Play() when GameObject is outside of camera view? (Fix for Shuriken stop rendering.)

Vector3 ParticlePlayground.PlaygroundParticlesC.gravity

The constant force towards gravitational vector.

Vector3 ParticlePlayground.PlaygroundParticlesC.initialLocalVelocityMax

The maximum starting velocity of each particle with normal or transform direction.

MINMAXVECTOR3METHOD ParticlePlayground.PlaygroundParticlesC.initialLocalVelocityMethod

Determines if the value of initial local velocity should be rectangular or spherical.

Vector3 ParticlePlayground.PlaygroundParticlesC.initialLocalVelocityMin

The minimum starting velocity of each particle with normal or transform direction.

float ParticlePlayground.PlaygroundParticlesC.initialRotationMax

Maximum initial particle rotation.

float ParticlePlayground.PlaygroundParticlesC.initialRotationMin

Minimum initial particle rotation.

Vector3 ParticlePlayground.PlaygroundParticlesC.initialVelocityMax

The maximum starting velocity of each particle.

MINMAXVECTOR3METHOD ParticlePlayground.PlaygroundParticlesC.initialVelocityMethod

Determines if the value of initial velocity should be rectangular or spherical.

Vector3 ParticlePlayground.PlaygroundParticlesC.initialVelocityMin

The minimum starting velocity of each particle.

Vector3AnimationCurveC ParticlePlayground.PlaygroundParticlesC.initialVelocityShape

The amount of velocity to apply of the spawning particle's initial/local velocity in form of a Vector3AnimationCurve.

float ParticlePlayground.PlaygroundParticlesC.initialVelocityShapeScale = 1f

The scale of initial velocity shape.

bool ParticlePlayground.PlaygroundParticlesC.isSnapshot = false

Is this particle system a snapshot?

float ParticlePlayground.PlaygroundParticlesC.lifetime

The maximum life of a particle in seconds.

Gradient ParticlePlayground.PlaygroundParticlesC.lifetimeColor

The color over lifetime.

List<PlaygroundGradientC> ParticlePlayground.PlaygroundParticlesC.lifetimeColors = new List<PlaygroundGradientC>()

The colors over lifetime (if Color Source is set to LifetimeColors).

float ParticlePlayground.PlaygroundParticlesC.lifetimeEmission = 1f

The emission during lifetime. This will compress the Lifetime Sorting pattern over the total lifetime. This can be used to have particles live longer than the otherwise obvious repeating pattern.

float ParticlePlayground.PlaygroundParticlesC.lifetimeLoss = 0f

The amount a particle will loose of its lifetime on collision.

float ParticlePlayground.PlaygroundParticlesC.lifetimeMin = 0

The minimum life of a particle when using lifetimeValueMethod of RandomBetweenTwoValues.

float ParticlePlayground.PlaygroundParticlesC.lifetimeOffset

The offset of lifetime in this particle system.

Vector3AnimationCurveC ParticlePlayground.PlaygroundParticlesC.lifetimePositioning

The lifetime positioning of particles using a Vector3AnimationCurveC. This will annihilate any forces and only move particles on the X, Y and Z Animation Curves.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.lifetimePositioningPositionScale

The scale of positioning for lifetime positioning.

float ParticlePlayground.PlaygroundParticlesC.lifetimePositioningScale = 1f

The overall scale of lifetime positioning.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.lifetimePositioningTimeScale

The scale of time for lifetime positioning.

bool ParticlePlayground.PlaygroundParticlesC.lifetimePositioningUsesSourceDirection = false

Should lifetime positioning use the direction normal of the source?

AnimationCurve ParticlePlayground.PlaygroundParticlesC.lifetimeSize

The size over lifetime of each particle.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.lifetimeSorting

Custom sorting for particle lifetime (when sorting is set to Custom).

VALUEMETHOD ParticlePlayground.PlaygroundParticlesC.lifetimeValueMethod

The method to apply lifetime values.

Vector3AnimationCurveC ParticlePlayground.PlaygroundParticlesC.lifetimeVelocity

The velocity over lifetime of each particle.

float ParticlePlayground.PlaygroundParticlesC.lifetimeVelocityScale = 1f

The lifetime velocity scale.

int ParticlePlayground.PlaygroundParticlesC.loadFrom = 0

Which data should be loaded (if loadFromStart is true).

bool ParticlePlayground.PlaygroundParticlesC.loadFromStart = false

Should the particle system load stored data from start?

bool ParticlePlayground.PlaygroundParticlesC.loadTransition = false

Should a transition occur whenever a Load is issued?

float ParticlePlayground.PlaygroundParticlesC.loadTransitionTime = 1f

The time for load transition in seconds.

TRANSITIONTYPEC ParticlePlayground.PlaygroundParticlesC.loadTransitionType

The type of transition to occur whenever a Load is issued.

Vector3 ParticlePlayground.PlaygroundParticlesC.lockPosition = Vector3.zero

The locked position.

bool ParticlePlayground.PlaygroundParticlesC.lockPositionIsLocal = false

The locked position is considered local.

Vector3 ParticlePlayground.PlaygroundParticlesC.lockRotation = Vector3.zero

The locked rotation.

bool ParticlePlayground.PlaygroundParticlesC.lockRotationIsLocal = false

The locked rotation is considered local.

Vector3 ParticlePlayground.PlaygroundParticlesC.lockScale = new Vector3(1f,1f,1f)

The locked scale.

bool ParticlePlayground.PlaygroundParticlesC.loop = true

Should a particle re-emit when reaching the end of its lifetime?

List<ManipulatorObjectC> ParticlePlayground.PlaygroundParticlesC.manipulators

The list of Local Manipulator Objects handled by this PlaygroundParticlesC object.

float ParticlePlayground.PlaygroundParticlesC.mass = .01f

The mass of a particle (calculated in collision with rigidbodies).

float ParticlePlayground.PlaygroundParticlesC.maxCollisionDepth = 0f

Maximum collision depth of Raycast2D.

float ParticlePlayground.PlaygroundParticlesC.maxVelocity = 100f

The maximum positive- and negative velocity of each particle.

float ParticlePlayground.PlaygroundParticlesC.minCollisionDepth = 0f

Minimum collision depth of Raycast2D.

float ParticlePlayground.PlaygroundParticlesC.minDeltaMovementStrength = 0

The minimum strength to multiply delta movement with. This will apply when using deltaMovementStrengthValueMethod of RandomBetweenTwoValues.

float ParticlePlayground.PlaygroundParticlesC.minShurikenLifetime = .08f

The minimum Shuriken lifetime clamps the lifetime value for each particle. When a Shuriken particle reaches 0 it will result in being removed from screen, where a noticable flicker will occur if the particle has the same birth as death position. Upon using Texture Sheet Animation you may want this to be set to 0 if your particles has a short lifetime (below 1) to get all tiles into the animation.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.movementCompensationLifetimeStrength

The strength of movement compensation over particles lifetime

bool ParticlePlayground.PlaygroundParticlesC.multithreadedStartup = true

Determines if multithreading should be used to initialize all caches for the particle system. The tradeoff of sparing the main thread from initializing all caches is that it can result in the particle system taking a couple of frames before it's ready to start emission.

int ParticlePlayground.PlaygroundParticlesC.nearestNeighborOrigin = 0

The initial source position when using lifetime sorting of Nearest Neighbor/Reversed and nearestNeighborOriginMethod of NEARESTNEIGHBORORIGINMETHOD.SourcePoint. This will let you sort the lifetime from a generated particle birth position.

NEARESTNEIGHBORORIGINMETHOD ParticlePlayground.PlaygroundParticlesC.nearestNeighborOriginMethod

The method to set the Lifetime Sorting: Nearest Neighbor/Reversed with.

Transform ParticlePlayground.PlaygroundParticlesC.nearestNeighborOriginTransform

The initial source position when using lifetime sorting of Nearest Neighbor/Reversed and nearestNeighborOriginMethod of NEARESTNEIGHBORORIGINMETHOD.Transform. This will let you sort the lifetime from a Transform's position in world space.

Vector3 ParticlePlayground.PlaygroundParticlesC.nearestNeighborOriginVector3

The initial source position when using lifetime sorting of Nearest Neighbor/Reversed and nearestNeighborOriginMethod of NEARESTNEIGHBORORIGINMETHOD.Vector3. This will let you sort the lifetime from a Vector3 in world space.

bool ParticlePlayground.PlaygroundParticlesC.onlyLifetimePositioning = false

Should the particles only position by lifetime positioning Vector3AnimationCurves?

bool ParticlePlayground.PlaygroundParticlesC.onlySourcePositioning = false

Should the particles only position on their source (and not apply any forces)?

OVERFLOWMODEC ParticlePlayground.PlaygroundParticlesC.overflowMode = OVERFLOWMODEC.SourceTransform

The method to calculate Overflow Offset with.

Vector3 ParticlePlayground.PlaygroundParticlesC.overflowOffset

The offset direction and magnitude when particle count exceeds source count.

PaintObjectC ParticlePlayground.PlaygroundParticlesC.paint

The paint source of this PlaygroundParticles.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.particleArraySize

The size over particle array of each particle. This will multiply the size of each particle depending on its position in the particle array.

ParticleSystem.Particle [] ParticlePlayground.PlaygroundParticlesC.particleCache

The particle pool.

int ParticlePlayground.PlaygroundParticlesC.particleCount

The amount of particles within this PlaygroundParticlesC object.

int ParticlePlayground.PlaygroundParticlesC.particleMask = 0

The masked amount of particles. The particleMaskTime will determine if the particles should fade in/out.

MASKSORTINGC ParticlePlayground.PlaygroundParticlesC.particleMaskSorting

The method to distribute the sorting mask when particleMask is above 0.

float ParticlePlayground.PlaygroundParticlesC.particleMaskTime = 0f

The time it takes to mask in/out particles when using particleMask.

GameObject ParticlePlayground.PlaygroundParticlesC.particleSystemGameObject

The GameObject of a PlaygroundParticlesC object.

int ParticlePlayground.PlaygroundParticlesC.particleSystemId

The id of this PlaygroundParticlesC object.

Renderer ParticlePlayground.PlaygroundParticlesC.particleSystemRenderer

The Renderer of a PlaygroundParticlesC object.

ParticleSystemRenderer ParticlePlayground.PlaygroundParticlesC.particleSystemRenderer2

The ParticleSystemRenderer of a PlaygroundParticlesC object.

Transform ParticlePlayground.PlaygroundParticlesC.particleSystemTransform

The Transform of a PlaygroundParticlesC object.

float ParticlePlayground.PlaygroundParticlesC.particleTimescale = 1f

The simulation time scale for all particles within this system. Set time scale to 0 to pause a particle system.

bool ParticlePlayground.PlaygroundParticlesC.pauseCalculationWhenInvisible = false

Should the particle system pause calculation upon becoming invisible?

PlaygroundCache ParticlePlayground.PlaygroundParticlesC.playgroundCache = new PlaygroundCache()

Data for each particle.

ParticleProjectionC ParticlePlayground.PlaygroundParticlesC.projection

The projection source of this PlaygroundParticles.

bool ParticlePlayground.PlaygroundParticlesC.rotateTowardsDirection = false

Should the particles rotate towards their movement direction. The rotationNormal will determine from which angle the rotation is based on.

Vector3 ParticlePlayground.PlaygroundParticlesC.rotationNormal = -Vector3.forward

The rotation direction normal when rotating towards direction (always normalized value).

float ParticlePlayground.PlaygroundParticlesC.rotationSpeedMax

Maximum amount to rotate a particle over time.

float ParticlePlayground.PlaygroundParticlesC.rotationSpeedMin

Minimum amount to rotate a particle over time.

float ParticlePlayground.PlaygroundParticlesC.scale = 1f

The scale of minimum and maximum particle size.

Vector3 ParticlePlayground.PlaygroundParticlesC.scatterScale = new Vector3(1f,1f,1f)

The scale of source scatter. This can be changed over time to move the scattering seamlessly.

Color ParticlePlayground.PlaygroundParticlesC.scriptedEmissionColor = Color.white

When using Emit() the passed in color will decide the color for this particle if colorSource is set to COLORSOURCEC.Source.

int ParticlePlayground.PlaygroundParticlesC.scriptedEmissionIndex

When using Emit() the index will point to the next particle in pool to emit.

Vector3 ParticlePlayground.PlaygroundParticlesC.scriptedEmissionPosition

When using Emit() the passed in position will determine the position for this particle.

Vector3 ParticlePlayground.PlaygroundParticlesC.scriptedEmissionVelocity

When using Emit() the passed in velocity will determine the speed and direction for this particle.

ParticleSystem ParticlePlayground.PlaygroundParticlesC.shurikenParticleSystem

This ParticleSystem (Shuriken) component.

float ParticlePlayground.PlaygroundParticlesC.sizeMax = 1f

Maximum size of particles.

float ParticlePlayground.PlaygroundParticlesC.sizeMin = 1f

Minimum size of particles.

SkinnedWorldObject ParticlePlayground.PlaygroundParticlesC.skinnedWorldObject = new SkinnedWorldObject()

A skinned mesh as source calculated within the scene.

PlaygroundCache ParticlePlayground.PlaygroundParticlesC.snapshotData

The storage of position data if this is a snapshot.

List<PlaygroundSave> ParticlePlayground.PlaygroundParticlesC.snapshots = new List<PlaygroundSave>()

Saved data of properties (positions, velocities, colors etc.).

SORTINGC ParticlePlayground.PlaygroundParticlesC.sorting = SORTINGC.Scrambled

Sort mode for particle lifetime.

SOURCEC ParticlePlayground.PlaygroundParticlesC.source

The particle source method for distributing particles upon birth.

Vector3 ParticlePlayground.PlaygroundParticlesC.sourceScatterMax

The maximum spread of source position scattering.

Vector3 ParticlePlayground.PlaygroundParticlesC.sourceScatterMin

The minimum spread of source position scattering.

Transform ParticlePlayground.PlaygroundParticlesC.sourceTransform

A transform calculated within the scene.

bool ParticlePlayground.PlaygroundParticlesC.sourceUsesLifetimeAlpha

Should the source color use alpha from Lifetime Color instead of the source's original alpha?

List<PlaygroundSpline> ParticlePlayground.PlaygroundParticlesC.splines

The splines used as Source. Particle birth positions will populate along the spline using the list of particles as normalized time on the curves of the spline. To offset the time use splineTimeOffset.

List<ParticleStateC> ParticlePlayground.PlaygroundParticlesC.states = new List<ParticleStateC>()

The list of States for this PlaygroundParticles. A State is Source data from a texture or mesh which determines where particles will be positioned upon birth.

bool ParticlePlayground.PlaygroundParticlesC.stickyCollisions = false

Determines if particles should stick to their collided surface.

float ParticlePlayground.PlaygroundParticlesC.stickyCollisionsSurfaceOffset = 0

The sticky collisions offset from the collided surface normal.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.stretchLifetime

The lifetime stretching of stretched particles.

float ParticlePlayground.PlaygroundParticlesC.stretchSpeed = 1f

The speed of stretching to reach full effect.

Vector3 ParticlePlayground.PlaygroundParticlesC.stretchStartDirection = Vector3.zero

The starting direction of stretching if all initial velocity is zero.

bool ParticlePlayground.PlaygroundParticlesC.syncPositionsOnMainThread = false

Should each particle's position be synced with main-threaad? Use this when dealing with moving source objects or if you experience a laggy particle movement.

ThreadMethodLocal ParticlePlayground.PlaygroundParticlesC.threadMethod

The multithreading method how this particle system should calculate. Use this to bypass the Playground Manager's threadMethod.

float ParticlePlayground.PlaygroundParticlesC.timeOfSnapshot = 0

The global time the snapshot was made.

bool ParticlePlayground.PlaygroundParticlesC.transitionBackToSource = false

Should the particles transition back to their source position during their lifetime? Use transitionBackToSourceAmount to set the strength by a normalized AnimationCurve.

AnimationCurve ParticlePlayground.PlaygroundParticlesC.transitionBackToSourceAmount

The amount to transition back to the source position by a normalized AnimationCurve.

bool ParticlePlayground.PlaygroundParticlesC.turbulenceApplyLifetimeStrength = false

Should Turbulence Lifetime Strength apply?

AnimationCurve ParticlePlayground.PlaygroundParticlesC.turbulenceLifetimeStrength

The Turbulence Lifetime Strength. Use this to control how much turbulence will affect the particle over its lifetime.

float ParticlePlayground.PlaygroundParticlesC.turbulenceScale = 1f

The turbulence resolution scale. A higher value will generate a more dense grid.

float ParticlePlayground.PlaygroundParticlesC.turbulenceStrength = 10f

The turbulence strength.

float ParticlePlayground.PlaygroundParticlesC.turbulenceTimeScale = 1f

The turbulence time scale.

TURBULENCETYPE ParticlePlayground.PlaygroundParticlesC.turbulenceType = TURBULENCETYPE.None

The type of turbulence.

int ParticlePlayground.PlaygroundParticlesC.updateRate = 1

The rate to update this PlaygroundParticles.

Vector3 ParticlePlayground.PlaygroundParticlesC.velocityBending

The amount to bend velocity of each particle.

VELOCITYBENDINGTYPEC ParticlePlayground.PlaygroundParticlesC.velocityBendingType

The type of velocity bending.

float ParticlePlayground.PlaygroundParticlesC.velocityScale = 1f

The overall scale of velocity.

WorldObject ParticlePlayground.PlaygroundParticlesC.worldObject = new WorldObject()

A mesh as source calculated within the scene.

bool ParticlePlayground.PlaygroundParticlesC.worldObjectUpdateNormals = false

The current world object will change its normals over time. This produces memory garbage with quantity based upon the mesh normals.

bool ParticlePlayground.PlaygroundParticlesC.worldObjectUpdateVertices = false

The current world object will change its vertices over time. This produces memory garbage with quantity based upon the mesh vertices.

Property Documentation

float ParticlePlayground.PlaygroundParticlesC.LastTimeUpdated
getset

Gets or sets when this particle system was last time updated. This is done automatically while the particle system is simulated.

The last time updated.

float ParticlePlayground.PlaygroundParticlesC.LocalDeltaTime
getset

Gets or sets the local delta time of this particle system. This is done automatically while the particle system is simulated.

The local delta time.


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