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 dad, developer, designer, maker who loves everything in technology: AI, mechanics, electronics, IT, 3D printing.

Leave a Reply

Your email address will not be published. Required fields are marked *

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