public void ReturnToPool() { if (!_initialized) { Initialize(); } if (myPool != null) { myPool.PoolObjectReturned(this); } else { Debug.LogError("I DONT HAVE A POOL!", this); } transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; _behaviours.ForEach(x => x.enabled = false); _colliders.ForEach(x => x.enabled = false); _renderers.ForEach(x => x.enabled = false); //Maybe change to GetComponentsInChildren<Transform>(true); ?? for (int i = 0; i < transform.childCount; i++) { transform.GetChild(i).gameObject.SetActive(false); } _particleSystems.ForEach(x => x.Stop()); _audioSources.ForEach(x => x.Stop()); if (_rigidbody) { _rigidbody.isKinematic = true; _rigidbody.velocity = Vector3.zero; _rigidbody.angularVelocity = Vector3.zero; _rigidbody.rotation = Quaternion.identity; _rigidbody.freezeRotation = true; _rigidbody.Sleep(); } inPool = true; ReturnToPoolEvent?.Invoke(); }