title: How to Draw a Ray Along a Sprite in Unity
body: <p>I am trying to cast a ray along a sprite in Unity. I have Created an empty GameObject and made it as Parent to different Textures of Head, Hand, Chest etc of a Character to easily Animate it, Now for Melee Combat I would like to Cast a Ray along the Hand Texture while it Animates the Attack but I am Unable to get the Centre of the Hand Texture in the Scene.
  I am trying to Access the Sprite by the following Code</p>
  
  <pre><code>Sprite Hand = gameObject.GetComponentsInChildren &lt;Transform&gt; () [4].GetComponentsInChildren &lt;Transform&gt; () [0].gameObject.GetComponent &lt;SpriteRenderer&gt; ().sprite;
  </code></pre>
  
  <p>This Code is Working for accessing the Hand Transform I verified by Drawing a Ray from the transforms centre</p>