Katalyst6 / CSL.NetworkExtensions

11 stars 9 forks source link

NewRoad NetCollection has null m_prefabs. #19

Open DinkyToyz opened 8 years ago

DinkyToyz commented 8 years ago

This mod creates a NetCollection, NewRoad, with a null m_prefabs property which seems causes null reference exceptions in some mods. I believe it may also cause a handled (possibly harmless) null reference exception in game code (in LoadingManager.Update()).

The property is later assigned, but during ILoadingExtension.OnCreated() (at least for mods called after Network Extensions) it's null and findable.

It's probably a good idea to initialize the m_prefabs property before adding the NewRoad object to the game objects.

Katalyst6 commented 8 years ago

Good idea! I will try to delay the creation of the collection itself

Thanks! Really appreciated