Hello,
I’m just modifying and adding with Unity tutorial (2D and 3D tutorials found on the unity site).
But some of script of that does not work with Unity-iPhone. I know Unity-iPhone does not support dynamic type but what’'s the following error about?
error:
Assets/Scripts/2D/LevelAttributes.js(48.21):'size’is not a member of ‘UnityEngine.Component’.
leftBoundary.AddComponent (BoxCollider);
boxCollider.size = Vector3 (colliderThickness, bounds.height + colliderThickness * 2.0 + fallOutBuffer, colliderThickness);
Is it not the instance of BoxCollider which is the return value of AddComponent?
Also I tried the follwings but same result:
leftBoundary.AddComponent (BoxCollider);
boxCollider = leftBoundary.GetComponent(BoxCollider);
boxCollider.size = Vector3 (colliderThickness, bounds.height + colliderThickness * 2.0 + fallOutBuffer, colliderThickness);
I used GetComponent but no effect on that.
Thank you for any help and reply.
-Kim