MidiMaster() { GameObject sourceGo = new GameObject("Midi Master Source"); sourceGo.hideFlags = HideFlags.HideInHierarchy; _source = sourceGo.AddComponent <MidiSource>(); _source.endpointId = uint.MaxValue; GameObject destinationGo = new GameObject("Midi Master Destination"); destinationGo.hideFlags = HideFlags.HideInHierarchy; _destination = destinationGo.AddComponent <MidiDestination>(); _destination.endpointId = uint.MaxValue; }
MidiMaster() { GameObject sourceGo = new GameObject("Midi Master Source"); GameObject.DontDestroyOnLoad(sourceGo); sourceGo.hideFlags = HideFlags.HideInHierarchy; _source = sourceGo.AddComponent <MidiSource>(); _source.endpointId = Application.platform.Equals(RuntimePlatform.Android) ? 0 : uint.MaxValue; GameObject destinationGo = new GameObject("Midi Master Destination"); GameObject.DontDestroyOnLoad(destinationGo); destinationGo.hideFlags = HideFlags.HideInHierarchy; _destination = destinationGo.AddComponent <MidiDestination>(); _destination.endpointId = Application.platform.Equals(RuntimePlatform.Android) ? 0 : uint.MaxValue; }