title: Workaround for Constructors in Unity C#
body: <p><a href="http://answers.unity3d.com/questions/32413/using-constructors-in-unity-c.html" rel="nofollow">http://answers.unity3d.com/questions/32413/using-constructors-in-unity-c.html</a>
  That does not exactly solve the following problem:</p>
  
  <ul>
  <li>Various Weapon Levels</li>
  <li>Server-Client Architecture</li>
  <li>Server wants to spawn a weapon or projectile, but BEFORE wants to set which player shot, which level the weapon has etc.</li>
  <li>WeaponScript should handle all Effects, like Instantiation themselves</li>
  </ul>
  
  <p>I could do it like so</p>
  
  <pre><code>GameObject fireball = (GameObject)GameObject.Instantiate(pfFireball, p.Position, p.Rotation);
  FireBall fb = (FireBall)fireball.GetComponent(typeof(FireBall));
  fb.agressorId = pId;
  fb.weaponLevel = p.Controller.WeaponLevel;
  networkView.RPC("ShootClientWeapon", RPCMode.All, (int)w, p.PlayerId);
  </code></pre>
  
  <p>But what if I wanted to let my weapons handle the logic of their appearance/ Instantiation. For Instance if I have a weapon whose gameobject either spawns directly at the position of every player or just the agressor. Fail.
  I expected something like...</p>
  
  <pre><code> fireball fb = new FireBall();
   fb.gameObject = prefabFireball;
   fb.agressorId = pId;
   fb.weaponLevel = p.Controller.WeaponLevel;
   fb.Fire();
  </code></pre>
  
  <p>Is there a workaround?
  If I make a class not inheriting Monobehaviour then my update method is gone I guess. But the only thing that I need is to handle Instantiation myself.</p>