public static void Pool(SgtJovianModel model) { if (model != null) { model.Jovian = null; SgtComponentPool <SgtJovianModel> .Add(model); } }
public static void MarkForDestruction(SgtJovianModel model) { if (model != null) { model.Jovian = null; model.gameObject.SetActive(true); } }
public void UpdateModel() { if (model == null) { model = SgtJovianModel.Create(this); } var scale = SgtHelper.Divide(Radius, MeshRadius); model.SetMesh(Mesh); model.SetMaterial(material); model.SetScale(scale); }
protected virtual void OnDestroy() { SgtJovianModel.MarkForDestruction(model); SgtHelper.Destroy(material); }