title: How to send slider information over websocket in Unity?
body: <p>I am developing an application for my Hololens. My environment contains sliders. I am using <a href="https://www.assetstore.unity3d.com/en/#!/content/38367" rel="nofollow noreferrer">websocket-sharp</a>. I want to send the slider position values (0,180) over the WebSocket. Could someone help me with any pointers regarding how to achieve the same?</p>
  
  <p>Ok as suggested, here are my game object or the sliders I have. </p>
  
  <pre><code> public void initializeSliders(Slider[] sliderList_)
      {
          var CanvasChildren = CanvasObj.GetComponentsInChildren&lt;Slider&gt;();
  
          for (int i = 0; i &lt; CanvasChildren.Length; i++)
          {
              if (CanvasChildren[i].name == "Slider0")
              {
                  sliderList_[0] = CanvasChildren[i];
  
                  sliderList_[0].minValue = lowerLimit[0];
                  sliderList_[0].maxValue = upperLimit[0];
                  sliderList_[0].value = 0;
              }
              else if (CanvasChildren[i].name == "Slider1")
              {
                  sliderList_[1] = CanvasChildren[i];
  
                  sliderList_[1].minValue = lowerLimit[1];
                  sliderList_[1].maxValue = upperLimit[1];
                  sliderList_[1].value = 0;
              }
              else if (CanvasChildren[i].name == "Slider2")
              {
                  sliderList_[2] = CanvasChildren[i];
  
                  sliderList_[2].minValue = lowerLimit[2];
                  sliderList_[2].maxValue = upperLimit[2];
                  sliderList_[2].value = 0;
              }
           }
      }
  </code></pre>
  
  <p>I would like to get the value of the sliders when the user manipulates them in the hololens and send it over the WebSocket. ( I am new to Unity and C#)</p>