-
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
Clean up Loading extension CustomPathManager #730
Comments
Also This line should throw an exception for consistency reasons (don't worry ... its in a try..,catch block): TMPE/TLM/TLM/LoadingExtension.cs Line 501 in 06eda8d
The code for CustomPathManager OnLevelLoaded() and OnLevelUnLoading() could be like this:
Then in the loading extension OnLevelLoading():
|
Please send in a PR for this and #731 so we can test; it's always good to get the code cleaned up and improved. |
@krzychu124 are you using debug build? is it latest master branch? |
I do not observe double hot reload of TrafficManager.dll when I hot reload my HideCrossings.dll That said, the traffic manager did load again (maybe after hot reload the serialize data extension is called again?)
|
we need something like this:
|
moved hot reload logic to OnEnabled()
There is some untidy code in loading extension that looks like legacy code which no one has bothered to clean up. The code for Custom Path manger has the following problems:
The value assigned to CustomPathManager in OnCreated() is never used. Its overwritten in loading extension. CustomPathManager is unlike other managers and cannot be instantiated in OnCreated(). This line is redundant and should be deleted:
TMPE/TLM/TLM/LoadingExtension.cs
Line 282 in 06eda8d
CustomPathManager = new CustomPathManager();
Considering that the Loading extension holds a reference to an Instance of CustomPathManager, accessing the static _Instance field is unnecessary:
TMPE/TLM/TLM/LoadingExtension.cs
Line 330 in 06eda8d
Use This property instead:
TMPE/TLM/TLM/LoadingExtension.cs
Line 63 in 06eda8d
CustomPathManager needs OnLevelLoaded() and OnLevelUnLoading(). The following code in loading extension needs to go into these new functions:
TMPE/TLM/TLM/LoadingExtension.cs
Line 356 in 06eda8d
TMPE/TLM/TLM/LoadingExtension.cs
Line 497 in 06eda8d
The text was updated successfully, but these errors were encountered: