Ejemplo n.º 1
0
 private void validateInstance()
 {
     if (_instance != null && _instance != this)
     {
         Debug.Log("There was multiple MiraReticle instances in your scene, destroying one");
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
    private void Start()
    {
        reticle = GameObject.FindObjectOfType <MiraReticle>();

        rend = gameObject.GetComponent <LineRenderer>();
        if (rend)
        {
            float width = 1 * widthMultiplier * 1 / MiraArController.scaleMultiplier;
            rend.endWidth   = width;
            rend.startWidth = width;
        }
    }