Ways of communication between the extension and the project on the Unity3d


#1

Suppose I have an extension for tweak (panel: Video Overlay (full over the player)) and a project created in Unity3D and I want to make the send button active in my extension when it is needed on my channel.
Question: what are the communication methods between the extension and the project on Unity3D so that I can “say” to the extension “make the send button active”?


#2

You’re going to need a middleman server so the game and extension communicate with that.


#3

please can explain in more detail what is meant by “middleman server”?


#4

Unity Project sends data to the server,
the server sends data to Twitch PubSub,
extension listens to Twitch PubSub.

Conversely,

Extension sends data to the server
The server sends the data down to that instance of the Unity Project

The server is literally in the middle.

It Twitch Extension vernacular we refer to this as a EBS. Extension backend service


#5

Thanks for the answers, but can the extension “listen” to the chat channel on which it is installed? If so, is there any way to implement the receipt of a “command” by an extension through, for example, bot chat or whispering from the channel owner?
Suppose this may be required so that viewers can not “indulge” through the chat and make, for example, the send button active and inactive.


#6

To make it simple, Twitch extensions are simply webpages. And you communicate with a server if you want.
On the side, you can have a chatbot or other twitch integration that can react to data sent by your extension.

But you will have to build these services


#7

Or yes, you can direct connect to Twitch Chat in the JS of the extension. Generally it’s better to spin up a chat bot for additional logging/debugging.