Categories
Game Development PC Nerding

Odd

This script works well while in Unity Editor
GameObject obj = new GameObject("MyObject");
MyScript s = obj.AddComponent();
s.MethodThatInstantiateSomething("argument");

But when calling it in a Android APK it return a Null Pointer Reference error when calling MethodThatInstantiateSomething, at the line where Instantiate() is called.

Odd.

By Andrea Giorgio "Muu?" Cerioli

Italian developer, designer, maker who loves everything in technology: mechanics, electronics, IT, 3D printing.

Leave a Reply

You have to agree to the comment policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.