I want to disable domain reloading to speed up entering Playmode. However, every time I enter playmode, my script attaches methods to certain InputAction events. So without domain reloading, those events keep piling up. I use anonymous methods as callbacks, so I can’t do a -= before adding them. Is there any method that allows clearing performed/started/canceled before adding methods to them?
I didn’t find any way of doing it directly. C# provides no way of resetting events, unless you have event ownership. So I just store every single delegate I add in a list and don’t add the delegates unless needed.