Такой вопрос про Resources.Load
В Editor'e все нормально работает. Билд же просто напросто отказывается загружать текстуры из этой папки.
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Material:Internal_CreateWithShader (UnityEngine.Material,UnityEngine.Shader)
at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00006] in C:\buildslave\unity\build\artifacts\generated\comm on\runtime\ShaderBindings.gen.cs:168
at PlayGameController.Start () [0x00012] in D:\bdocuments\ForKidsPuzzle\Assets\Game\PlayGameCo ntroller.cs:21
|
gObject.gameObject.GetComponent<SpriteRenderer>().material = new Material(Shader.Find("MaskedTexture"));