Removing #pragma strict from the script appears to make it work correctly. Did I read somewhere that this isn’t needed in 3.0 anymore because Unity implies it?
No, in fact it’s more necessary now. Unity iPhone used to have an implicit “#pragma strict”, but now that iOS publishing is part of Unity, that doesn’t happen anymore. But you still get code errors if you try to use dynamic typing when publishing for iOS, so it’s a good idea to always use #pragma strict when doing iOS (and probably Android) development.
The issue is that #pragma strict is more strict in Unity 3, so in order to avoid downcasting, you have to explicitly define the type that GetComponent is being cast to, by doing “otherScript = gameObject.GetComponent(foo) as foo;”. Either that or you can enable downcasting by using #pragma downcast.