In the editor I get no errors, but when I make a build and try to play it, I get a nullref error that causes the game to break.
Unity 4.3.4
Mac osx, not sure version, it’s a new mac mini bought last week.
The full error that shows in the deployed game is:
NullReferenceException
>UnityEngine.Material..ctor(UnityEngine.Shader shader)
SU_AsteroidField.CreateTransparentMaterial (UnityEngine.Material[] _sourceMaterials, System.Collections.Hashtable _ht)
(at \Users\Computername\Projectname\Assets/SpaceUnity/Scripts/SU_AsteroidField.cs:352) SU_AsteroidField.OnEnable()(at /Users/Computername/Projectname/Assets/SpaceUnity/Scripts/SU_AsteroidField.cs:123)
Using the asset store project “Space for Unity”…
In the editor no error and the asteroids spawn fine, build and deploy for mac and it throws the error above and no asteroids spawn…
Is that an internal process? I checked my scripts for a method named CreateTransparentMaterial, OnEnable, etc and they’re not in the scripts.