Getcomponent fails when built from cloud build
Im alittle baffled right now. In my script im doing the follow:
//get the VKShotFrame component
VK_ShotFrame killFrame = child.GetComponent<VK_ShotFrame>();
Debug.Log("KillFrame - " + killFrame);
if (killFrame != null && !skippedFirstFrame)
{
firstShotIndex = i;
skippedFirstFrame = true;
Debug.Log("Skipping " + child.name + " due to first shot frame");
continue;//Need to make sure we verify it actually is finding the frame
}
else
{
Debug.Log(child.name + " does not have a Shot Frame");
}
In my scene i have the object its looking for with the attached script. I verified in code that the object thats set to child in my example is correct and no duplicates. Im currently running on 5.6.0f3 of unity. Here is where the odd part comes in, In editor and if i build manually to iOS it builds correctly. But whenever it gets built through Unity Cloud build the killFrame variable in my example is null. At this point im not sure what the difference is. verified both xcodes were up to date. any insight is much appreciated.
Answer by hexagonius · Apr 07, 2017 at 12:37 AM
i would say the online repo is not up to date.
weird, apparently i had to push changes after reimporting the project on the mac i was making the ios build, which were working. Bottom line that fixed it, thanks.