Пример #1
0
 // public methods
 public void AddProjector(AutoProjector projector)
 {
     m_projectors.Add(projector);
     projector.uvIndex = 0;
     UpdateUVIndex(projector);
     projector.projector.projector.ignoreLayers |= m_environmentLayers;
 }
Пример #2
0
        public void RemoveProjector(AutoProjector projector)
        {
            var receivers = projector.GetReceivers();

            if (receivers != null)
            {
                projector.ClearReceivers();
                FreeReceivers(receivers);
            }
            m_projectors.Remove(projector);
        }
Пример #3
0
 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;
             }
         }
     }
 }