It seems there’s a bit of a misunderstanding here.
Of course, no need to apologize, as there is nothing to apologize for.
Yes! You are correct, data is shared among different plugins through _G and shared tables.
It is in no way scuffed, and to me it is a pretty reliable way to share data among two different plugins.
However, that’s not the issue I’m facing in this post.
What I’m referring to is cross DataModel plugin communication. Let me simplify things, a lot:
Imagine you have a plugin, let’s reefer to the plugin itself as “MainPlugin”. Once you save it/install it, it runs in your studio. We all know that.
But here’s the catch - depending on what mode you’re in, you’re actually seeing a different version of MainPlugin:
-
When you’re editing your game, MainPlugin is one running version of your plugin.
-
When you start playtesting your game, you are not seeing the original MainPlugin version (the one mentioned above), instead you are seeing another version of your plugin which runs when your start playtesting your game.
If you have a lot of plugins which also have their own windows (widgets) and if you potentially have a slower system, once you start play-testing, you might see small windows appear in the center of your screen for a brief moment - those are your plugins starting up in the playtesting mode.
So, when I say “cross DataModel plugin communication”, I mean:
I want for the two different versions of MainPlugin to communicate with one another.
In my actual case, I need the version that runs while I am editing my game to communicate appropriate data to the version that starts up when I start playtesting my game.
In other words, this isn’t about two separate plugins talking to each other, it’s about two seperate instances of the same plugin, running in different DataModels / Modes, talking to each other.
For more appropriate and non-simplified information about all this, check out metatablecat’s reply, pretty much this whole quoted part explains all of this.