- Home /
When I build my game to test, why does the menu lose all functionality besides 'exit'?
I built my game to do a quick test, but it loses all functionality besides exit. I cannot start it.
This is my script:
var levelToLoad : String;
var soundhover : AudioClip;
var beep : AudioClip;
var QuitButton : boolean = false;
function OnMouseEnter(){
audio.PlayOneShot(soundhover);
}
function OnMouseUp(){
audio.PlayOneShot(beep);
yield new WaitForSeconds(0.35);
if(QuitButton){
Application.Quit();
}
else{
Application.LoadLevel(levelToLoad);
}
}
@script RequireComponent(AudioSource)
My Start Game is supposed to leave the menu to the prologue, and my about button, to an about page.
In my output_log, I get this.
Initialize engine version: 4.3.4f1 (e444f76e01cd)
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 9.0c [igdumdim32.dll 10.18.10.3412]
Renderer: Intel(R) HD Graphics
Vendor: Intel
VRAM: 912 MB (via DXGI)
Caps: Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=1 INTZ=1 RAWZ=0 NULL=1 RESZ=1 SlowINTZ=0
Begin MonoManager ReloadAssembly
- Completed reload, in 1.130 seconds
desktop: 1366x768 60Hz; virtual: 3286x1080 at 0,0
Initializing input.
Input initialized.
Platform assembly: C:\Users\trevo_000\Desktop\ConquestTest1_Data\Managed\System.Core.dll (this message is harmless)
Platform assembly: C:\Users\trevo_000\Desktop\ConquestTest1_Data\Managed\Boo.Lang.dll (this message is harmless)
The variables of the 'InvPauseGame' script on 'Inventory' has not been assigned.
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)
Platform assembly: C:\Users\trevo_000\Desktop\ConquestTest1_Data\Managed\UnityScript.Lang.dll (this message is harmless)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script.OnMouseEnter () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at Hover Script+$OnMouseUp$71+$.MoveNext () [0x00000] in :0
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UnityEngine.HitInfo:SendMessage(String)
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
(Filename: Line: -1)
If anyone could help, that would be great, thanks.
hi its really ard to read the code Go to Edit and then select the Code and then press 10101
that is really strange.Are you sure all other buttons are included in the scene as well
Answer by T-D-M-3 · Apr 20, 2014 at 12:19 PM
I think that i see your problem, what you need to do is change line 17 to this:
Application.LoadLevel(""+levelToLoad);
Hope this helps!
I had two errors, and one was fixed by you! Thanks a million!
Answer by tw1st3d · Apr 20, 2014 at 12:25 PM
Looks like your issue may have something to do with you trying to play audio.
Audio looks fine to me, however i don't quite understand how the GUI on this works...
I had two errors, and removing the audio function fixed it; it didn't actually use it. Thanks a million!
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
Android - Error building Player: CommandInvokationFailure: Failed to re-package resources 3 Answers
My android app build has more bugs on it than the editor/deveploment version 0 Answers