What's the decent way to share a property of a single object plugin to all other single object plugins?
So, I don't have to include the same property to each plugin.
Thanks a lot in advance for the time.
I wanted to share a Property from one main plugin to be used by other dependent plugins.
Ashley, your advice would be greatly appreciated.
What exactly are you trying to do? Do you want one property that other plugins can read, or every plugin to have a property that is synchronised with other plugins? Why do you need this and what is it for?
I am using a backend service with an API that lets you use a key for that client application. Instead of inserting each plugin with that key, I wanted to let the Main API Single Object Plugin to hold the key for the other dependent plugins.
Develop games in your browser. Powerful, performant & highly capable.
Ashley
Do you want one property that other plugins can read
This is exactly it. I wanted to know the C2Runtime way to handle this too, just for backwards compatibility.
Well, the easiest way is just to make a global variable... to keep it neat use a namespace object like window.MyPluginData = {}; MyPluginData.foo = "bar"; etc.
window.MyPluginData = {}; MyPluginData.foo = "bar";
Thanks. Good to know that's the decent way.