I'm trying to move my project over to my mac laptop and unity iOS and have unearthed a number of issues due to dynamic typing. I have gotten rid of most but am left with a few outstanding issues this being one of them.
At one point I am trying to reference a script to disable it so I don't get any interference from it during another part of the game. Here is a code snip.
if (GUI.Button (position5, plankPhy, style5))
if (Physics.Raycast (ray, hit, 300)) {
Instantiate(PhyPlank, hit.point, Quaternion.identity);
GetComponentInChildren(ClickSpawn).enabled = false;
Time.timeScale = .0000001;
This works great when playing for PC or web but as soon as I put it on my iOS build (or in this case throw "#pragma strict" at the top of my code for working on my pc I get an error...
BCE0019: 'enabled' is not a member of 'UnityEngine.Component'.
What's happening in the script is when an object the player moves and places down in the map is spawned it freezes time to allow the player to place the object but it also disables a script that generates geo when the mouse button is clicked.
There is a second part to the script that references the script again to enable it again. Any help as always is very much appreciated. Thank you!