Kerbal Inventory System (KIS)

Kerbal Inventory System (KIS)

1M Downloads

On initial load KIS_UISoundPlayer trhows errors

ihsoft opened this issue ยท 2 comments

commented
[LOG 04:36:41.988] AddonLoader: Instantiating addon 'KIS_UISoundPlayer' from assembly 'KIS'
[LOG 04:36:41.988] Loading UI sounds for KIS...
[LOG 04:36:41.989] Loading clip: KIS/Sounds/bipwrong
[ERR 04:36:41.989] Cannot locate clip: KIS/Sounds/bipwrong

[LOG 04:36:41.990] Loading clip: KIS/Sounds/click
[ERR 04:36:41.990] Cannot locate clip: KIS/Sounds/click

[LOG 04:36:41.990] Loading clip: KIS/Sounds/attachScrewdriver
[ERR 04:36:41.991] Cannot locate clip: KIS/Sounds/attachScrewdriver

It works fine after that. Looks like sounds initialization is done at the wrong moment.

commented

Attempt to check the sound file in the game based before its load in there. Need review attribute [KSPAddon(KSPAddon.Startup.EveryScene, false /once/)] on line 13, file "KIS_UISoundPlayer.cs".
I have changed it to [KSPAddon(KSPAddon.Startup.MainMenu, true)]. After that it works fine.

commented

Thanks for the suggestion. In fact, this whole class is to be deprecated in favor of https://github.com/ihsoft/KSPDev/blob/master/Sources/Utils/GUIUtils/UISoundPlayer.cs.