- Home /
How to render a particle system with a preset particle system in a prefab?
Hi there everyone. I have a preset particle system that is a prefab that is being called as an splat. The particle system is set to Burst, to emit a short 1 second blast. In my script, I have declared to turn on the prefab and make it true, declare the location of the prefab during game play, and have put in Debug Logs to show that the particle system is active. Everything checks out good, but for some reason the particle system is not emitting.
Here is the section of the code where I am calling the prefab that has the particle system:
Destroy(video);
Destroy(videoMirror);
// particle system for splat to render
// particle system is attached to a prefab called waffleSplat
waffleSplat.gameObject.SetActive(true);
Debug.Log("waffle splat true" + waffleSplat.gameObject);
waffleSplat.transform.position = Slot.GetSlot((target.coord.x), (target.coord.y),
0).transform.position;
Debug.Log("waffle splat is visible" + waffleSplat.transform.position);
SessionAssistant.main.EventCounter();
The particle system is to render between the videos being destroyed and the logged event counter.
I have figured out how to show the particle system by using:
Instantiate(waffleSplat, transform.position, waffleSplat.transform.rotation);
However, now I am facing an issue of deter$$anonymous$$ing the location of x and y due to a video playing at the same location of (target.coord.x) and (target.coord.y). I need the particle system to render where the video is being played on x and y coordinates.