Skip to content

Commit

Permalink
fix(Examples): fix a warning on Unity 5.5 and above
Browse files Browse the repository at this point in the history
The used properties of a `ParticleSystem` are now on its `MainModule`.
  • Loading branch information
Christopher - Marcel Böddecker committed Jan 6, 2017
1 parent be7659c commit 5b6f950
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ public void Spray(float power)
{
particles.Play();
}

#if UNITY_5_5_OR_NEWER
var mainModule = particles.main;
mainModule.startSpeedMultiplier = maxSprayPower * power;
#else
particles.startSpeed = maxSprayPower * power;
#endif
}
}

Expand Down

0 comments on commit 5b6f950

Please sign in to comment.