// public methods public void AddProjector(AutoProjector projector) { m_projectors.Add(projector); projector.uvIndex = 0; UpdateUVIndex(projector); projector.projector.projector.ignoreLayers |= m_environmentLayers; }
public void RemoveProjector(AutoProjector projector) { var receivers = projector.GetReceivers(); if (receivers != null) { projector.ClearReceivers(); FreeReceivers(receivers); } m_projectors.Remove(projector); }
public void UpdateUVIndex(AutoProjector projector) { if (m_blobShadowTextures != null && 1 < m_blobShadowTextures.Length && projector.projector.projector.material.HasProperty(m_shadowTexName)) { var tex = projector.projector.projector.material.GetTexture(m_shadowTexName) as Texture2D; for (var i = 0; i < m_blobShadowTextures.Length; ++i) { if (tex == m_blobShadowTextures[i]) { projector.uvIndex = i; break; } } } }