Talk:SplashScreen
From Unify Community Wiki
(Difference between revisions)
(Another way of getting around the Audio Listener Error) |
|||
Line 9: | Line 9: | ||
}</csharp> | }</csharp> | ||
Simply add that to the top of the OnUpdate function and it works... But will still interrupt sound once a level starts loading. --[[User:CorruptedHeart|CorruptedHeart]] 11:21, 7 September 2010 (PDT) | Simply add that to the top of the OnUpdate function and it works... But will still interrupt sound once a level starts loading. --[[User:CorruptedHeart|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). --[[User:AnomalousUnderdog|AnomalousUnderdog]] 06:37, 8 September 2010 (PDT) |
Revision as of 13:37, 8 September 2010
- 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)