- Home /
Question by
Alfredwooden · Mar 08, 2019 at 03:31 AM ·
c#unity 5instantiateprefabinstantiate prefab
Destroying assets is not permitted to avoid data loss.
Hi everyone! Im having this problem in unity. Can someone help me ?
I think that the problem comes from "instantiate prefabs" ? But I dont know how to fix it. Im kinda new on this so I still need the help of the people hahaha
This is the code
IEnumerator DestroyParticleWhenFinished(GameObject particlePrefab) { while (particlePrefab.GetComponent<ParticleSystem>().isPlaying) { yield return new WaitForSeconds(PARTICLE_CLEAN_UP_DELAY); } Destroy(particlePrefab); yield return new WaitForEndOfFrame(); }
screen-shot-2019-03-08-at-153958.png
(56.0 kB)
Comment
Your answer
Follow this Question
Related Questions
Why is my Prefab Instantiating when the Scene is Loaded? 2 Answers
How to make TCG Deck (Instatiate based on Prefab) 1 Answer
My objects instantiate at a strange z coordinate 0 Answers
Instantiating an object as a child of another object 1 Answer
Instantiating an array of objects - how can I instantiate a certain prefab only once? 1 Answer