-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MidiJack not working after scene change #13
Comments
is there any update on this issue? I'm having the same issue. |
I can't reproduce the issue. Could you provide a minimum project that reproduces the issue? |
Ok, it turns out that the issue only happens when you check for midi input and switch scenes in the same method (I think?). Here is a project with the issue: https://github.com/cakyman/MidiJackIssue |
Thanks for providing the project. I'll look into it later. |
I have the same issue with version Just checking for key input. After one scene restart, the Midi Key won't be clicked anymore. if (MidiMaster.GetKeyDown(noteNumber))
StartGame(); |
You are keeping the public static void CreateGameObject(Callback callback)
{
var go = new GameObject("MIDI Updater");
// this is the line which causes the problem!
GameObject.DontDestroyOnLoad(go);
go.hideFlags = HideFlags.HideInHierarchy;
var updater = go.AddComponent<MidiStateUpdater>();
updater._callback = callback;
} If you uncomment this line, the midi updater will work after changing the scene! |
Whenever I try to use SceneManager.LoadScene(), and then in the new scene try using MidiMaster.GetKeyDown(), nothing happens. There are no errors of any kind, and no logs. Do I need to re-initialise it somehow?
The text was updated successfully, but these errors were encountered: