sometimes C# makes me want to stab my head.
anyways, why can’t I do this:
GameObject shot;
shot = Instantiate (IcarusBullet, transform.position + transform.forward * collider.bounds.extents.z, transform.rotation);
It bitches Cannot implicitly convert from UnityEngine.Object to GameObject.
okay, so I force the cast:
GameObject shot;
shot = (GameObject)Instantiate (IcarusBullet, transform.position + transform.forward * collider.bounds.extents.z, transform.rotation);
but then I get InvalidCastExceptions (cannot cast from source type to destination).
Ultimately I just want to call:
shot.setColor(getColor());
after instantiating my bullet so its the right color
(setColor and getColor are defined in IcarusBaseObject which IcarusBulletScript inherits from)