private int samplesToTake = 1024; // how many audio samples should we take? //singleton logic void OnEnable() { if (instance == null) { instance = this; } }
void OnDisable() { instance = null; }