示例#1
0
        public void ShowScanLine(bool show)
        {
            // Toggle scanline rendering
            if (scanLine != null)
            {
                Renderer scanLineRenderer = scanLine.GetComponent <Renderer>();
                if (show)
                {
                    // Enable scan line rendering
                    if (!scanLineRenderer.enabled)
                    {
                        scanLineRenderer.enabled = true;
                    }

                    scanLine.ResetAnimation();
                }
                else
                {
                    // Disable scanline rendering
                    if (scanLineRenderer.enabled)
                    {
                        scanLineRenderer.enabled = false;
                    }
                }
            }
        }
 private void ShowScanLine(bool show)
 {
     // Toggle scanline rendering
     if (scanLine != null)
     {
         Renderer scanLineRenderer = scanLine.GetComponent <Renderer>();
         if (show)
         {
             // Enable scan line rendering
             if (!scanLineRenderer.enabled)
             {
                 scanLineRenderer.enabled = true;
             }
             on2    = false;
             names2 = "";
             scanLine.ResetAnimation();
         }
         else
         {
             names2 = mTrackableBehaviour.TrackableName;
             on2    = true;
             // Disable scanline rendering
             if (scanLineRenderer.enabled)
             {
                 scanLineRenderer.enabled = false;
             }
         }
     }
 }