Question Saving Event Trigger Values in First Plugin

XPlay

New member
Messages
1
Reactions
0
Points
1
Hi everyone

I'm creating my first plugin and I'm having trouble figuring out how to store the event trigger values.

My plugin retrieves real-world data from an Arduino and uses it to set the "Force Factor" of a "Cycle Force" (or what the user is willing to do).

I adapted code from MeshedVR/TriggerControlSimple.cs to access the "Trigger Event UI." I can set it up and everything works until I load a new scene. Unfortunately, the values are lost at that point.

Other values in my plugin are saved because I register them using RegisterFloat(float value). However, I'm unsure how to register the trigger value. The only JSONStorable variable I've found is "JSONStorableAction OpenTriggerDetailPanelAction;" and attempts to use "RegisterAction(OpenTriggerDetailPanelAction);" haven't been successful.

Could someone please help me with this?
 
Back
Top Bottom