Ok, so I have no idea why, but when I am assigning a variable in one of my C# scripts to a JavaScript instance, my app closes with X-Code saying “iPhone has exited with status 1”.
where PlatformerController is a Javascript script attached to a gameobject. I get no errors when testing on the computer w/Unity Remote. Does anyone have any idea what is going on? I am using C# to assign an internal variable to a JS instance elsewhere with no issues, so I can’t really figure this one out. Could there possibly be something inside PlatformerController that is screwing it up? Thanks.
When you’re running with Unity Remote, check the Unity output for “null reference exceptions.”
When you’re running in the editor w/ Remote these won’t crash you, but they will crash when running on the iPhone.
This would possibly happen if the object doesn’t actually have a PlatformController component.
It could also be that something in the JavaScript is doing something similar, trying to load or call methods on a component or object that isn’t actually there.
Thanks for the response. The PlatformerController script does indeed exist on the object, and it runs with no problems when I remove the line from the script in the original post.