- Home /
Objects still in scene on loadscene? (creating objects on destroy?)
Ok so on-destroy create a explosion or an Item, cool, but if i die and reloads the current scene the item and the explosions remain?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EXp : MonoBehaviour {
public GameObject Explotion;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void OnDestroy() {
GameObject Clone = Instantiate(Explotion, transform.position, transform.rotation);
}
}
Comment
Your answer
Follow this Question
Related Questions
How can I "reload" my deleted scenes folder?! 1 Answer
After scene reload script stopped working. 1 Answer
when i load scene, it starts same scene over 0 Answers
GameManager and scene design issue. 1 Answer
Problem with Application.Loadedlevel 0 Answers