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