How can I address a script I don't know the type of?
问题 My game uses a variety of different game modes, and I'd like to spawn a different GameController script at the beginning of the scene depending on the game mode selected. Then other items (e.g., Enemies), would reference the main GameController, whether that be GameController_Mode1, GameController_Mode2, etc. But how can I have other objects referencing this if I don't know the type? Unity iOS requires strict unityscript typing, so I can't use duck typing to get around this. 回答1: You can do