• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.

Question Send data between plugins

TasteyTreats

New member
Joined
Apr 6, 2024
Messages
8
Reactions
4
I want to make a custom two part plugin to control speed and intensity, with a main handler that sits in your main scene so speed and intensity can be shared consistently between subscenes, and a controller node that sits in subscenes to actually control the speed changes to an animation.

Is there a simple way to share data between these two plugins?

I imagine a solution where controller nodes are automatically detected by the main handler, and sent updates when needed.

Maybe there is a simple plugin to use as an example?

I tried having a look at the code for VUML and ActionGrouper, but it was thousands of lines of code and a bit difficult to understand.
 
Subscenes are loaded asynchronously, so that's a problem.
You could have a plugin that uses the broadcast system. VAMStory and VAMLive uses that sort of trick.
 
Upvote 0
Is there a simple way to share data between these two plugins?
Triggers are the intended way for plugin communication in VaM. Have a look at LogicBricks for how to make a plugin where you have UI to configure the trigger target. This should be perfect for what you are looking for, as it allows for a modular approach with decent performance. When using MacGruber_Utils (which is under CC BY now) its just a couple of lines of code you need.
Something like LogicBricks ValueRelay may be a good example for sending a float value.

Unity engines broadcast system technically works, too, but the performance is terrible. Fine for occasional calls, but not something you do every frame.
 
Upvote 0
Unity engines broadcast system technically works, too, but the performance is terrible. Fine for occasional calls, but not something you do every frame.

Did not mention it, but I was sure they would read the documentation **wink wink nudge nudge** ?
 
Upvote 0
Back
Top Bottom