public void InstantiateHullRenderer(ShipHullRenderer hullPrefab, WeaponInformationType canonType) { if (currentHullObject != null) { ClearLastHullRenderer(); } currentHullObject = Object.Instantiate(hullPrefab, rotationParent); currentHullObject.transform.localPosition = Vector3.zero; currentHullObject.transform.localRotation = Quaternion.identity; currentHullObject.name = "Currently Equiped Hull"; hullPrefab.CheckObjectsToShow(canonType); }
public void ClearLastHullRenderer() { Object.Destroy(currentHullObject.gameObject); currentHullObject = null; }