예제 #1
0
        public void DestroyInstance()
        {
            _simulationLinks  = null;
            _prevTimeAddition = 0;

            GameObject.Destroy(_instance);
        }
예제 #2
0
        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);
        }