RushHour icon indicating copy to clipboard operation
RushHour copied to clipboard

Issue building from source - EventPopupManager._panel = null?

Open Jonno12345 opened this issue 9 years ago • 4 comments

Hey, I realise this may be an issue with my build set up, I just can't seem to understand where.

Upon building the latest source and adding the mod, I get the following:

The Mod D:\SteamLibrary\steamapps\common\Cities_Skylines\Files\Mods\RushHour [CimTools.dll, RushHour.dll] has caused an error [ModException]

Details:
System.NullReferenceException: Object reference not set to an instance of an object
  at RushHour.Events.EventPopupManager.Initialise () [0x00000] in <filename unknown>:0 
  at RushHour.Events.EventPopupManager.get_Instance () [0x00000] in <filename unknown>:0 
  at RushHour.LoadingExtension.OnLevelLoaded (LoadMode mode) [0x00000] in <filename unknown>:0 
  at LoadingWrapper.OnLevelLoaded (UpdateMode mode) [0x00000] in <filename unknown>:0 

Trying to debug the issue, it seems like _panel never initialises with an object:

image

image

It seems that _panel = LoadingExtension._mainUIGameObject.AddComponent<EventPopupPanel>(); doesn't seem to be returning an object.

Have you come across this before? I'm guessing this is something not working within UnityEngine, but thought I'd check if you've come across it..!

Jonno12345 avatar Jul 08 '16 11:07 Jonno12345

That's really strange. It does definitely seem like Unity isn't creating the panel right, but I can't understand why. Maybe the mainUIGameObject isn't getting created correctly. I can't say I've ever come across this before though.

PropaneDragon avatar Jul 08 '16 19:07 PropaneDragon

Hmm, fair enough. Must be a problem my end, although I'm not quite sure where..! Just wondered if you'd experienced it at all. Please file this issue as appropriate, will do some further digging my side :)

Jonno12345 avatar Jul 09 '16 15:07 Jonno12345

Do you know if it's possible to see Unity debug output anywhere? I'm not sure if it could be showing me a more useful failure log somewhere hidden away.

Jonno12345 avatar Jul 10 '16 10:07 Jonno12345

Unity creates an output_log.txt file in the game directory. It might be advantageous for you to use ModTools to debug, as it has a better output and allows you to debug the UI which is probably what you want.

PropaneDragon avatar Jul 10 '16 11:07 PropaneDragon