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.MeshParticles Class Reference
Inheritance diagram for ParticlePlayground.MeshParticles:
ParticlePlayground.PlaygroundParticlesC

Static Public Member Functions

static PlaygroundParticlesC CreateMeshParticles (Mesh[] meshes, Texture2D[] textures, Texture2D[] heightMap, string name, Vector3 position, Quaternion rotation, float particleScale, Vector3[] offsets, Material material)
 
static void Add (PlaygroundParticlesC meshParticles, Mesh mesh, float scale, Vector3 offset, string stateName, Transform stateTransform)
 
static void Add (PlaygroundParticlesC meshParticles, Mesh mesh, Texture2D texture, float scale, Vector3 offset, string stateName, Transform stateTransform)
 
- Static Public Member Functions inherited from ParticlePlayground.PlaygroundParticlesC
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)
 

Additional Inherited Members

- Public Member Functions inherited from ParticlePlayground.PlaygroundParticlesC
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 ()
 
- Public Attributes inherited from ParticlePlayground.PlaygroundParticlesC
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 inherited from ParticlePlayground.PlaygroundParticlesC
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...
 

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