I have this line:
Instantiate(toMake, gameObject.transform.position + nextOutputLocation(), gameObject.transform.rotation);
It throws no errors. All the code around it works fine. When I do this:
bool success = null != Instantiate(toMake, gameObject.transform.position + nextOutputLocation(), gameObject.transform.rotation);
then success == true. However, the instantiated object appears nowhere in the hierarchy. This worked just a couple of days ago.
I’m not sure if this is related, but it should be noted that I have this warning that has recently started appearing at runtime: *The referenced script on this Behaviour (Game Object ‘Make Mobile Unit’) is missing! “*Make Mobile Unit” is the button that the script in question is called from. But again: the script does get called.
Any help would be appreciated.