I think this may be an error but I wanted to see if anybody else is seeing this.
here’s the code
var fadeMaterial = gameObject.Find("cubes").GetComponentInChildren(Transform);
for (var materialToFade : Transform in fadeMaterial) {
materialToFade.gameObject.AddComponent("CubeScript");
materialToFade.gameObject.AddComponent("Rigidbody");
materialToFade.gameObject.AddComponent("BoxCollider");
materialToFade.gameObject.collider.size = Vector3(0.4,0.4,0.4);
materialToFade.gameObject.rigidbody.useGravity = true;
}
This is throwing an error for the size component. It is saying the ‘size’ is not a member of UnityEngine.Collider.
But size is a member (at least it works fine in regular unity and the manual shows it should work too)
can anybody repeat this for me?
thanks
Flash