Closed x37v closed 1 year ago
using UnityEngine;
using Cycling74.RNBOTypes;
public class PlayerMovement : MonoBehaviour
{
const int instanceIndex = 1;
SyncCycleHelper helper;
SyncCycleHandle plugin;
void Start() {
helper = SyncCycleHelper.FindById(instanceIndex);
plugin = helper?.Plugin;
if (plugin != null) {
plugin.PresetEvent += (object sender, PresetEventArgs arg) => {
Debug.LogFormat("PresetEvent Event: {0}", arg.Preset);
};
}
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Y))
{
plugin.GetPreset();
}
}
}
now reflected in PRESETS.md
requires more plumbing but would be nice to not block when requesting a preset