public void RemoveTexture() { if (cachedStarfieldSet == false) { cachedStarfield = GetComponent <SgtStarfield>(); cachedStarfieldSet = true; } if (cachedStarfield.NearTex == generatedTexture) { cachedStarfield.NearTex = null; cachedStarfield.UpdateNearTex(); } }
public void ApplyTexture() { if (cachedStarfieldSet == false) { cachedStarfield = GetComponent <SgtStarfield>(); cachedStarfieldSet = true; } if (cachedStarfield.NearTex != generatedTexture) { cachedStarfield.NearTex = generatedTexture; cachedStarfield.UpdateNearTex(); } }