-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use SerializableUIOptionBase for all options. #1510
Labels
code cleanup
Refactor code, remove old code, improve maintainability
Settings
Road config, mod options, config xml
Milestone
Comments
Merged
I did some investigation on how to do this in https://github.com/CitiesSkylinesMods/TMPE/tree/DropDownOption2
|
Hot-reload stopped working... ( Stacktrace
NullReferenceException: Object reference not set to an instance of an object
at TrafficManager.UI.Helpers.DropDownOption`1[TrafficManager.API.Traffic.Enums.SimulationAccuracy].set_Value (SimulationAccuracy value) [0x00000] in <filename unknown>:0
at TrafficManager.UI.Helpers.DropDownOption`1[TrafficManager.API.Traffic.Enums.SimulationAccuracy].Load (Byte data) [0x00000] in <filename unknown>:0
at TrafficManager.Manager.Impl.OptionsManager.ToDropDown[SimulationAccuracy] (System.Byte[] data, UInt32 idx, ILegacySerializableOption opt, SimulationAccuracy defaultVal) [0x00000] in <filename unknown>:0
at TrafficManager.Manager.Impl.OptionsManager.LoadData (System.Byte[] data) [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
TrafficManager.Util.Shortcuts:LogException(Exception, Boolean)
TrafficManager.Manager.Impl.OptionsManager:LoadData(Byte[])
TrafficManager.Lifecycle.SerializableDataExtension:Load()
TrafficManager.Lifecycle.TMPELifecycle:Awake()
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
UnityEngine.GameObject:.ctor(String, Type[])
TrafficManager.Lifecycle.TMPELifecycle:StartMod()
TrafficManager.Lifecycle.TrafficManagerMod:OnEnabled()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
ColossalFramework.Plugins.PluginManager:AddPlugins(Dictionary`2)
ColossalFramework.Plugins.PluginManager:LoadPluginAtPath(String, Boolean, PublishedFileId)
ColossalFramework.Plugins.PluginManager:OnPluginAdded(String)
ColossalFramework.Plugins.<>c__DisplayClass20:<OnFileWatcherEventChanged>b__1a()
ColossalFramework.Threading.<>c__DisplayClass4:<CreateSafeAction>b__3()
ColossalFramework.Threading.<>c__DisplayClassa:<.ctor>b__8(Task)
ColossalFramework.Threading.Task`1:Execute()
ColossalFramework.Threading.Task:InternalExecute()
ColossalFramework.Threading.Dispatcher:RunTask(Task)
ColossalFramework.Threading.Dispatcher:ProcessSingleTask(Task)
ColossalFramework.Threading.Dispatcher:InternalProcessTasks()
ColossalFramework.Threading.Dispatcher:ProcessTasks() |
ill put a guard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
code cleanup
Refactor code, remove old code, improve maintainability
Settings
Road config, mod options, config xml
there are still some UI options that are not using the SerializableUIOptionBase . Specially drop downs that use Enums.
For more flexibility all options should use SerializableUIOptionBase .
The text was updated successfully, but these errors were encountered: