-
Notifications
You must be signed in to change notification settings - Fork 2
Unity
zjy edited this page Jul 13, 2016
·
1 revision
[C# 基础知识系列] http://www.cnblogs.com/zhili/category/421637.html
u5 bug collect:
1.Screen position out of view frustum (screen pos 506.000000, 331.000000) (Camera rect 0 0 600 450) ?
solved-screen-position-out-of-view-frustum
public class mTest11 : MonoBehaviour {
public ParticleSystem[] childParticleSystems;
void OnEnable()
{
childParticleSystems = GetComponentsInChildren<ParticleSystem>();
}
void OnGUI()
{
if (GUI.Button(new Rect(10, 10, 150, 100), "I am a button")) Restart();
}
void Restart()
{
for (int i = 0; childParticleSystems != null && i < childParticleSystems.Length; i++)
{
childParticleSystems[i].Simulate(0f, false, true);
childParticleSystems[i].Stop();
childParticleSystems[i].Clear();
childParticleSystems[i].Play();
}
}
}
http://pierrechamberlain.ca/blog/2012/10/using-object-pooling-design-particle-system/ http://answers.unity3d.com/questions/257222/recycling-particle-emitter-leaves-particles-in-2-l.html
Anti-Cheat Toolki