public static SgtCloudsphereModel Create(SgtCloudsphere cloudsphere) { var model = SgtComponentPool <SgtCloudsphereModel> .Pop(cloudsphere.transform, "Cloudsphere Model", cloudsphere.gameObject.layer); model.Cloudsphere = cloudsphere; return(model); }
public void RemoveTexture() { if (cachedCloudsphereSet == false) { cachedCloudsphere = GetComponent <SgtCloudsphere>(); cachedCloudsphereSet = true; } if (cachedCloudsphere.DepthTex == generatedTexture) { cachedCloudsphere.DepthTex = null; cachedCloudsphere.UpdateDepthTex(); } }
public void ApplyTexture() { if (cachedCloudsphereSet == false) { cachedCloudsphere = GetComponent <SgtCloudsphere>(); cachedCloudsphereSet = true; } if (cachedCloudsphere.DepthTex != generatedTexture) { cachedCloudsphere.DepthTex = generatedTexture; cachedCloudsphere.UpdateDepthTex(); } }