mixer / interactive-unity-plugin

Unity Plugin for Mixer Interactivity
MIT License
59 stars 23 forks source link

standalone exe cannot connect while in editor it does. #106

Closed rasterknight closed 4 years ago

rasterknight commented 6 years ago

Hi,

Before giving more details if needed: If I run my sample in the Unity Editor I manage to connect and get interactivity working from the stream. But if I build an exe and run it alone it does not manage to connect/register: Message being: [Connection failed (error code 4020): The interactive version was not found or you do not have access to it. Make sure that the account you are signed in with has access to this Version ID. If you are using a share code, make sure that the share code value matches the one in the interactive Studio for this project.]

Is there something specific to do for the stand alone builds ?

(Using latest Unity and latest Mixer SDK (from asset store).)

Thanks.

Nick

rasterknight commented 6 years ago

After more testing:

Looks like the standalone exe tries to get the AuthToken from cache (in case of Unity PlayerPrefs), and then even if it is the first ever launch of this build: manages to find cached some and tries to connect to interactive service only to fail.

By calling: MixerInteractive.ClearSavedLoginInformation(); and relaunching the exe I get to the app to gen the code to use at mixer.com/go.

It is not clear to me what is the supposed correct way for a standalone exe to behave, particulary the first time it is launched.

Any pointer to info ?

Thanks in advance.

Nick

payzer commented 6 years ago

Thank you for your question. The first time a standalone exe is launched, the user would see the screen telling them to go to mixer.com/go.

payzer commented 6 years ago

And yes, the editor and client can't both connect at the same time since only 1 game client can be connected to a channel at once.

rasterknight commented 6 years ago

Thank you for your question. The first time a standalone exe is launched, the user would see the screen telling them to go to mixer.com/go.

Thanks for the answer.

so this the normal supposed behaviour ? and so then caches the AuthToken so that subsequent launches do not require going to mixer.com/go (until maybe some long term expiration of token).

AechDub commented 5 years ago

Yes that's expected.