title: How to change value of inspecter scale using c#
body: <p>Is it possible to change the inspectors values like scale?<br>
  Can i do it with a script? </p>
  
  <p>Each time I have to generate obstacles with different scale values im realy new to unity so more explanation is needed the code for obstacle is written here:</p>
  
  <pre><code>    using UnityEngine;
  public class Obstacle : MonoBehaviour
  {
      //rigi=GetComponent&lt;Rigidbody2D&gt;();
      public Vector2 velocity = new Vector2(-4, 0);
      public float r;
      // Use this for initialization
      void Start()
      {
          GetComponent&lt;Rigidbody2D&gt;().velocity = velocity;
          transform.position = new Vector3(transform.position.x, transform.position.y - r * Random.value, transform.position.z);
      }
  }
  </code></pre>