microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

SingleInstance.OnDestroy should be virtual. #1004

Closed timGerken closed 6 years ago

timGerken commented 6 years ago

https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/57a18910669daec4f5328480719a66bea04fa2c2/Assets/HoloToolkit/Utilities/Scripts/SingleInstance.cs#L35

OnDestroy should be marked as virtual, otherwise it hijacks my script's ability to handle OnDestroy to do its own cleanup.

StephenHodgson commented 6 years ago

Agreed, although I thought it was already virtual.

StephenHodgson commented 6 years ago

Hey @timGerken, in the future please be sure to open a Pull Request, so we can track this better.

Thanks.

timGerken commented 6 years ago

sigh, @StephenHodgson , though I was pushing to my fork instead of directly here. Not sure how to undo that action... @keveleigh ?

StephenHodgson commented 6 years ago

It's no worries, I've done the same before.