Closed ghost closed 2 years ago
https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/CanvasUtil/CanvasButton.cs#L69-L71
https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/CanvasUtil/CanvasButton.cs#L46-L58
https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/CanvasUtil/CanvasText.cs#L42-L48
https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/CanvasUtil/CanvasImage.cs#L34-L42
UnityEngine.Object.DontDestroyOnLoad
can only be used for root objects, otherwise it will output "DontDestroyOnLoad only works for root GameObjects or components on root GameObjects."
Closed by #28.
https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/TopMenu.cs#L418 https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/TopMenu.cs#L428 https://github.com/homothetyhk/HollowKnight.BenchwarpMod/blob/7047c5b235f6e4281ce960e47e08f41140c6dc1e/Benchwarp/TopMenu.cs#L413
Using
HeroController.instance
to check for player presence will cause UnityLogger to output a lot of garbage, useHeroController.UnsafeInstance
instead.The same is true forGameManager.instance
.