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