From Unify Community Wiki
Jump to: navigation, search
  • I figured out how to remove the Audio Listener error, it requires that the audio listener is removed from the Camera in the beginning. This is a pretty bad work around if you want to have music/sound playing while fading between levels. --CorruptedHeart 10:58, 7 September 2010 (PDT)

  • I also figured out another way of doing it:

<csharp>if (Application.isLoadingLevel) { Destroy(oldCam.GetComponent<AudioListener>()); Destroy(oldCam.GetComponent<GUILayer>()); }</csharp> Simply add that to the top of the OnUpdate function and it works... But will still interrupt sound once a level starts loading. --CorruptedHeart 11:21, 7 September 2010 (PDT)

Yes but in my work, I put music while one of the splash screen starts showing, so the best I can do is to delay the deletion of the AudioListener until the next scene is sure to have been loaded (this is what the current version of the code does). --AnomalousUnderdog 06:37, 8 September 2010 (PDT)

Now I'm having problems with this script in Unity 3, the Screen.width and Screen.height shows values of 640 and 480 even though I set my resolution to 600 by 450. --AnomalousUnderdog 19:15, 28 September 2010 (PDT)

Personal tools