MechJeb2

MechJeb2

4M Downloads

MechJeb 1 GUI skin not working

SmoothMcDouglette opened this issue ยท 0 comments

commented

Steps to reproduce

  1. Open mechjeb settings
  2. Click on "Use MechJeb 1 GUI skin"

Expected
The skin switches to the opaque grey with green text style as the older mechjeb had

Actual
No change whatsoever.

Reviewing the mechjeb_settings_global.cfg file, the MechJebModuleSettings flag useOldSkin is set to false, and skinId is 0. Toggling this button does not change the config. Manually editing the config file does nothing and the values are reverted the next time the game is launched.

Player.log file shows the following error whenever the button is toggled:

NullReferenceException: Object reference not set to an instance of an object
  at AssetBase.GetGUISkin (System.String skinName) [0x0003f] in <0435390348b6470d8166bd1c53b4b100>:0 
  at MuMech.GuiUtils.LoadSkin (MuMech.GuiUtils+SkinType skinType) [0x00054] in <2356f993b0404e1c95a8e2c97153dfcc>:0 
  at MuMech.MechJebModuleSettings.WindowGUI (System.Int32 windowID) [0x000dd] in <2356f993b0404e1c95a8e2c97153dfcc>:0 
  at MuMech.DisplayModule.ProfiledWindowGUI (System.Int32 windowID) [0x00000] in <2356f993b0404e1c95a8e2c97153dfcc>:0 
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) [0x00070] in <58f888e0d56a4620958c8e58a768c70d>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) [0x00078] in <58f888e0d56a4620958c8e58a768c70d>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 
(Filename: <0435390348b6470d8166bd1c53b4b100> Line: 0)

Attached is full log file
Player.log

Note I poked around in the source code and took a stab in the dark at fixing this but @lamont-granquist pointed out that the change I was doing wouldn't have solved the issue. Perhaps a useful starting point for debugging though?
#1591