protected override void Start() { base.Start(); if (tccps == null) { if (gameObject.GetComponentInChildren <TCCommonParametersSetter>() != null) { tccps = gameObject.GetComponentInChildren <TCCommonParametersSetter>(); } } if (NPS != null) { NPS.LoadAndInit(); } if (Atmosphere != null) { Atmosphere.InitPlanetoidUniforms(this); } if (Cloudsphere != null) { Cloudsphere.InitUniforms(this); } if (Ring != null) { Ring.InitUniforms(this); } ReSetupQuads(); //NOTE : Force resetup on start. }
public void Render() { if (Quads != null) { if (PlanetQuadsEnabled) { for (int i = 0; i < Quads.Count; i++) { if (Quads[i] != null && Quads[i].gameObject.activeInHierarchy) { Quads[i].Render(); } } } } if (Atmosphere != null) { if (AtmosphereEnabled) { Atmosphere.Render(); } } if (Ocean != null) { Ocean.Render(); } if (Cloudsphere != null) { if (CloudsphereEnabled) { Cloudsphere.Render(); } } if (Ring != null) { if (RingEnabled) { Ring.Render(); } } }
public void Render(Camera camera) { if (Quads != null) { if (PlanetQuadsEnabled) { for (int i = 0; i < Quads.Count; i++) { if (Quads[i] != null && Quads[i].gameObject.activeInHierarchy) { Quads[i].Render(camera, DrawLayer); } } } } if (Atmosphere != null) { if (AtmosphereEnabled) { Atmosphere.Render(camera, Origin, DrawLayer); } } if (Cloudsphere != null) { if (CloudsphereEnabled) { Cloudsphere.Render(camera, DrawLayer); } } if (Ring != null) { if (RingEnabled) { Ring.Render(camera, DrawLayer); } } }