Beispiel #1
0
        public void UnHighlightRenderer(Renderer renderer)
        {
            for (int i = 0; i < highlightGroups.Count; i++)
            {
                HighlightGroup group = highlightGroups[i];
                if (group.renderers.Contains(renderer))
                {
                    group.Remove(renderer);
                }
            }
            bool needsDepth, needsOverlay;
            bool renderingHighlighted = HasAny(out needsDepth, out needsOverlay);

            enabled = renderingHighlighted;
        }
Beispiel #2
0
 public void HighlightRenderer(Renderer renderer, int highlightGroupIndex)
 {
     for (int i = 0; i < highlightGroups.Count; i++)
     {
         HighlightGroup group = highlightGroups[i];
         if (group.renderers.Contains(renderer))
         {
             if (i != highlightGroupIndex)
             {
                 group.Remove(renderer);
             }
         }
         else
         {
             if (i == highlightGroupIndex)
             {
                 group.Add(renderer);
                 enabled = true;
             }
         }
     }
 }