void OnDisable() { // If we're being torn down for a script reload - cache the native pointers in something unity can serialize cachedPointers[0] = (long)studioSystem.getRaw(); cachedPointers[1] = (long)lowlevelSystem.getRaw(); cachedPointers[2] = (long)mixerHead.getRaw(); }