Author Topic: Merge of Mexico into Usa cause null pointer exception  (Read 65 times)

Zarkow

  • Newbie
  • *
  • Posts: 37
    • View Profile
Merge of Mexico into Usa cause null pointer exception
« on: May 01, 2021, 03:10:11 PM »
Repro:
Selected Mexico, merge with USA. Usa had previously merged in Canadas regions too.
Same exception happen after restarting Unity and doing the mexico to Usa merge again.

Crash stack trace:
NullReferenceException: Object reference not set to an instance of an object
WPM.WorldMapGlobe.internal_CountryDelete (System.Int32 countryIndex, System.Boolean deleteDependencies) (at Assets/WorldPoliticalMapGlobeEdition/Scripts/Core/Internal/WPMCountries.cs:1778)
WPM.WorldMapGlobe.CountryTransferCountryRegion (System.Int32 countryIndex, WPM.Region sourceCountryRegion, System.Boolean redraw) (at Assets/WorldPoliticalMapGlobeEdition/Scripts/WorldMapGlobeCountries.cs:1928)
WPM.WorldMapEditor.CountryTransferTo () (at Assets/WorldPoliticalMapGlobeEdition/Scripts/MapEditor/WorldMapEditorCountry.cs:443)
WPM.WorldMapEditorInspector.ShowEntitySelectors () (at Assets/WorldPoliticalMapGlobeEdition/Editor/WorldMapEditorInspector.cs:565)
WPM.WorldMapEditorInspector.OnInspectorGUI () (at Assets/WorldPoliticalMapGlobeEdition/Editor/WorldMapEditorInspector.cs:298)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <0fdaf67e8e744beea25e77915c19f81b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Zarkow

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Merge of Mexico into Usa cause null pointer exception
« Reply #1 on: May 01, 2021, 05:33:07 PM »
Solved it for now by re-importing the geodata and starting from scratch...

Which reminds me - any chance we could get all the geodata in json format, to easier write dev-parsers to create new custom geodata for different scenarios, instead of doing manual edits from inside the editor?
« Last Edit: May 02, 2021, 08:34:03 PM by Kronnect »