• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

Question Saving Event Trigger Values in First Plugin

XPlay

New member
Joined
Mar 19, 2024
Messages
1
Reactions
0
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