public void DestroyInstance() { _simulationLinks = null; _prevTimeAddition = 0; GameObject.Destroy(_instance); }
public void InstantiatePrefab(GameObject prefab) { if (_instance != null) { Object.Destroy(_instance); Debug.LogWarning("Loading prefab duplicate"); } _instance = Object.Instantiate(prefab, _physicsScene.RootTransform); _simulationLinks = _instance.GetComponent <SimulationLinks>(); _instance.SetActive(false); }