1

I replaced my GUI I had in (4.5) to the new UI system in 4.6. I'm using 4.6p1 unity. The game runs in the Unity Editor fine, but once it has been built it crashes on loadup. I've removed all UI elements and it builds and runs, but then my game has no UI.

In Unity, the console shows two errors on build:

    An asset is marked with HideFlags.DontSave but is included in the build:
Asset: 'Library/unity default resources'
(You are probably referencing internal Unity data in your build.)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

and

    Building - Failed to write file: Temp/StagingArea/Data/Resources/unity_builtin_extra
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

When I get a crash log when I run the game, here is the stack trace:

(0x000000013F8DEC91) c:\buildagent\work\d63dfc6385190b60\runtime\shaders\material.cpp (280 + 0x0): Unity::Material::CreateMaterial + 0x41
(0x000000000478627C) (Mono JIT code): (filename not available):  UnityEngine.UI.Text:get_defaultMaterial () + 0x3c (0000000004786240 0000000004786295) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004786201) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:get_material () + 0x41 (00000000047861C0 0000000004786213) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004785D8C) (Mono JIT code): (filename not available):  UnityEngine.UI.MaskableGraphic:get_material () + 0xec (0000000004785CA0 0000000004785D98) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004785B51) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:get_materialForRendering () + 0x61 (0000000004785AF0 0000000004785C72) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004785A77) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:UpdateMaterial () + 0x57 (0000000004785A20 0000000004785AC2) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004781DA8) (Mono JIT code): (filename not available):  UnityEngine.UI.Graphic:Rebuild (UnityEngine.UI.CanvasUpdate) + 0x58 (0000000004781D50 0000000004781DB6) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x000000000478171D) (Mono JIT code): (filename not available):  UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate () + 0x46d (00000000047812B0 00000000047818B2) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004781276) (Mono JIT code): (filename not available):  UnityEngine.Canvas:SendWillRenderCanvases () + 0x26 (0000000004781250 000000000478127C) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x0000000004730543) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) + 0x63 (00000000047304E0 00000000047305B2) [0000000003CD4D48 - Unity Root Domain] + 0x0
(0x000007FEE01D3AF2) (mono): (filename not available): mono_set_defaults + 0x2b9e
(0x0000000003DDB0B8) ((module-name not available)): (filename not available): (function-name not available) + 0x0
(0x00000000FFFFFFFF) ((module-name not available)): (filename not available): (function-name not available) + 0x0
(0x0000000003CD4D48) ((module-name not available)): (filename not available): (function-name not available) + 0x0

So I know its the new UI causing the crash, but I have no clue how to fix.

I am using UnityEngine.UI; in certain scripts to access UI text and change it. IE scoreText.text = "Score: " + score;

I disabled all code in scripts and that access UnityEngine.UI; but that did not work either. Any ideas on how to fix this?

1 Answer 1

0

so I found this Japanese site and the solution fixed for me, basically don't use the Unity fonts, Arial works fine but anything else doesn't work (Lucida Granda). Hope it helps.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.