- Home /
Particle Systems Not Showing Up - Windows Phone
Hi there,
I'm working on a project for Windows phone and am having some trouble with invisible particle systems. Basically I have a few particle effects scattered through out the project (nothing fancy - explosions, rain, etc.). Some particles play on awake and looping, while others are toggled on tap. All particles work fine in Unity, but while testing to the device my particles that are toggled on and off don't show up at all. The particles that play on awake are visible. My project is in 2D and it doesn't seem to be linked to the layering system because some of them are showing up. Any thoughts?
Here's the toggle script I'm using - don't think that's related, though.
using UnityEngine; using System.Collections;
public class ShurikenToggler : MonoBehaviour {
public bool startsOn = false;
public ParticleSystem emitterToToggler;
public bool shutOffAfterTime = false;
public float timeToPlay = 5f;
private bool keepChecking = false;
float timeCountdown = 0f;
public void Start()
{
emitterToToggler.enableEmission = startsOn;
}
// Use this for initialization
void OnClick ()
{
emitterToToggler.enableEmission = !emitterToToggler.enableEmission;
if (shutOffAfterTime) {
if (emitterToToggler.enableEmission == false) {
keepChecking = false;
} else {
if (keepChecking) {
timeCountdown = timeToPlay;
} else {
keepChecking = true;
StartCoroutine(checkForKillin());
}
}
}
}
IEnumerator checkForKillin()
{
float timeInterval = 0.1f;
timeCountdown = timeToPlay;
while (keepChecking) {
if (timeCountdown <= 0) {
keepChecking = false;
emitterToToggler.enableEmission = false;
}
timeCountdown -= timeInterval;
yield return new WaitForSeconds(timeInterval);
}
}
}
Hi, did you solve this issue ? I am actually compiling on windows phone 8 and enableEmission always stays to true even when set to false.
Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613161309im_/https://answers.unity.com/themes/thub/images/avi.jpg)