Giter Club home page Giter Club logo

interactive-unity-plugin's Introduction

NOTE: This repo is no longer being maintained by Microsoft.

You can find more information here: https://dev.mixer.com/blog/mixplaysdkchanges


Welcome!

The Mixer Unity plugin helps you add features to your game that let the audience interact with people streaming your game!

Documentation

Checkout the Project's Wiki for documentation, including a Getting Started guide.

Doing something cool with Mixer?

We'd love to hear about it. Send us an email at [email protected].

Having Trouble?

We want to help you fix your problem. The most efficient way to do that is to open an issue in our issue Tracker.

Quick Links

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

interactive-unity-plugin's People

Contributors

aechdub avatar chnkr avatar fireflyforlife avatar funomena-michael avatar garfeild avatar mveerd avatar payzer avatar probableprime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interactive-unity-plugin's Issues

Joystick input throws an error when user reconnects

Joystick input works fine when the user first loads up interactive. However, if they refresh, any attempt to interact with the joystick will result in an error message (and no joystick event):

Error: Error while processing method: giveInput
UnityEngine.Debug:Log(Object)
Microsoft.Mixer.InteractivityManager:Log(String, LoggingLevel) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:3361)
Microsoft.Mixer.InteractivityManager:LogError(String, Int32) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:3350)
Microsoft.Mixer.InteractivityManager:LogError(String) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:3344)
Microsoft.Mixer.InteractivityManager:ProcessMethod(JsonReader) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:1459)
Microsoft.Mixer.InteractivityManager:ProcessWebSocketMessage(String) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:1391)
Microsoft.Mixer.InteractivityManager:OnWebSocketMessage(Object, MessageEventArgs) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:1342)
WebSocketSharp.Ext:Emit(EventHandler`1, Object, MessageEventArgs)
WebSocketSharp.WebSocket:messagec(MessageEventArgs)
WebSocketSharp.WebSocket:message()
WebSocketSharp.<>c__DisplayClass179_0:<startReceiving>b__1(WebSocketFrame)
WebSocketSharp.<>c__DisplayClass83_0:<ReadFrameAsync>b__3(WebSocketFrame)
WebSocketSharp.<>c__DisplayClass77_0:<readPayloadDataAsync>b__0(Byte[])
WebSocketSharp.<>c__DisplayClass55_0:<ReadBytesAsync>b__0(IAsyncResult)

Fairly quickly the stack trace goes into DLLs, so I don't know exactly what is going on, but I haven't found any dirty workarounds so this is a somewhat pressing issue.

Another note is that for some reason different results are produced when the Mixer Editor is open. When open, all users have the same joystick (rather than each client having their own like it's supposed to work). I mention this because the joystick error doesn't appear if the editor has been opened at any point while playing, so that may produce a false positive when testing.

BeamManager.SingletonInstance.Participants

The following code does not return the correct number of viewers. It also has multiples of some people and leaves out others.

void Viewers()
{
    Debug.Log("viewers in room: " + BeamManager.SingletonInstance.Participants.Count);
    foreach (BeamParticipant p in BeamManager.SingletonInstance.Participants)
        Debug.LogWarning(p.BeamUserName);
}

Allow channel scopes

A few developer have asked to be able to use the SDK to make channel queries. In the interim, it would be useful to expose a way to get the channel scopes and token so they can make channel queries.

This issue will track adding that to the SDK.

Getting Cost of Buttons Always Returns 0

When using the following code:

MixerInteractive.Button(e.ControlID).Cost

I will always get 0, no matter what value I set the Spark Cost to in the Studio.

I know right now pressing buttons with spark cost does not actually take sparks away, I wonder if this might be associated. If I were to publish my project would this return the correct amount of sparks as well as take them away?

Thanks.

[System.Serializable]

Could we get the [System.Serializable] added to the BeamParticipant and BeamGroup. This is used in the Unity inspector when serializing datatypes. Let me know if you need more information in this.

Doesn't run on MAC

This is a coming platform feature, but currently the SDK doesn't not run on MAC. We will look to fix this in the future. For now, disable Mixer for your MAC build.

participantID in InteractiveControl.cs

I thought this would do something, but right now I don't think anything references this. Is it planned in the future to do something? I need to get the particpantID of whoever pressed a button.

UWP crash on GoInteractive

The sample works, but we found a game where calling GoInteractive causes a native exception for the UWP build.

We are investigating. We will update with status as we have status.

Cool downs

Whilst working on a little something, i noticed that a button set to a minute long cool down, was still at a minute long after being triggered. I set out to investigate further and noticed that all my buttons were getting an extra 25 seconds for no reason. I checked my code and my seconds to milliseconds converter to make sure i hadn't thrown something in during my sleep deprived code session the night before, but to my surprise i couldn't find anything wrong. Thought i would put this out there, I'm not sure if its just me or something bigger.

Unable to Switch Scenes

Using InteractivityManager.SingletonInstance.SetCurrentScene("dropbox"); or MixerInteractive.SetCurrentScene("dropbox"); to set the scene has no effect.

It will change the ID of the current scene listed on Mixer but no observable change happens in the stream. This means that the current Scene ID after this command does become "dropbox" but the actual displayed Scene is always the "default" scene.

After executing the functions above I'd expect the Scene in Mixer Interactive to change, but in Chrome, Vivaldi and Edge that does not happen.

It appears that any changes to the scene will have no effect. The scene does not change when configured in the MixerInteractive script either. It is always initialized to the default scene.

Error: Could not retrieve the URL for the websocket.

Whenever Beam.GoInteractive() gets called, only errors return, "Error: Could not retrieve the URL for the websocket." followed by, "Error: Failed to get a new short code for authentication."

I've followed all the instructions in the "Getting Started" tutorial and all of the "Troubleshooting guide". The same errors occur whether I am testing my own scene, or any of the "Examples" scenes provided with the plugin. Here are the full texts of the errors:

Error: Could not retrieve the URL for the websocket.
UnityEngine.Debug:Log(Object)
Xbox.Services.Beam.BeamManager:Log(String, BeamLoggingLevel) (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:3079)
Xbox.Services.Beam.BeamManager:LogError(String) (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:3068)
Xbox.Services.Beam.BeamManager:InitiateConnection() (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:273)
Xbox.Services.Beam.BeamManager:Initialize(Boolean) (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:221)
Microsoft.Beam:BackgroundWorkerDoWork(Object, DoWorkEventArgs) (at Assets/Beam/Source/Scripts/Beam.cs:683)
System.ComponentModel.BackgroundWorker:ProcessWorker(Object, AsyncOperation, SendOrPostCallback)

Error: Failed to get a new short code for authentication.
UnityEngine.Debug:Log(Object)
Xbox.Services.Beam.BeamManager:Log(String, BeamLoggingLevel) (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:3079)
Xbox.Services.Beam.BeamManager:LogError(String) (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:3068)
Xbox.Services.Beam.BeamManager:RefreshShortCode() (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:678)
Xbox.Services.Beam.BeamManager:InitiateConnection() (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:291)
Xbox.Services.Beam.BeamManager:Initialize(Boolean) (at E:/GIT/Repos/Microsoft/xbox-live-beam-api-csharp/Source/api/BeamManager.cs:221)
Microsoft.Beam:BackgroundWorkerDoWork(Object, DoWorkEventArgs) (at Assets/Beam/Source/Scripts/Beam.cs:683)
System.ComponentModel.BackgroundWorker:ProcessWorker(Object, AsyncOperation, SendOrPostCallback)

Build error UWP with Xbox Live Unity Plugin

Hello,
I am getting a few errors when building out to UWP. I’m using both Xbox Live for Unity and the Mixer plug-ins. The errors I’m getting:
Assets\MixerInteractive\Source\DLLs\Websocket.cs(274,10): error CS0433: The type 'MonoPInvokeCallbackAttribute' exists in both 'Microsoft.Xbox.Services.UWP.CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'”.
mixer error

The 'Microsoft.Xbox.Services.UWP.CSharp is located in the Xbox Live for Unity folders (Xbox Live/Libs/ UWP.
I’m build in IL2CPP and net 4.6. The reason I’m using these setting is because Unity’s timelines do not play in Master Builds. I'm not sure if this is a Mixer or the Xbox Live plug-in error. The Xbox Live Unity plugin GitHub: https://github.com/Microsoft/xbox-live-unity-plugin

Thanks,

John

Groups added to the Beam script on the Beam Manager are "cleared" on play

Repro Steps:

  1. Add BeamManager to scene (empty in this case)
  2. Fill in the existing group id with some text.
  3. Click Add and fill in the new line group id with text.
  4. Push Play. All groups are cleared out from the UI. If you loop through the list of groups via code they still appear.

Before:

image

After:
image

Asset Store Package

Can not import the Unity Asset Store package to any projects, even a freshly created one. Getting the following error:
Failed to import package with error: Couldn't decompress package
UnityEditor.Web.JSProxyMgr:DoTasks()

InteractivityManager.ReadControls doesn't handle null (version 1.0)

We have 11 scenes setup in the Mixer builder, but I found that only a random subset of these were being found when I queried MixerInteractive.GetScene.

In the end I found that the list of scenes seemed to be received in a random order, and one of them had a null control group which caused parsing to malfunction at that point, sometimes it would resynchronise and read some more scenes, sometimes not.

In ReadControls, I changed the while loop to the following, and it seemed to then always parse all 11 scenes correctly.

            while (jsonReader.Read() && jsonReader.TokenType != JsonToken.Null && jsonReader.TokenType != JsonToken.EndArray)

Missing the Sources Folder

when importing the unity package from here on github, I am getting the following error:

Assets/Beam/Source/Editor/BeamSettingsWindow.cs(27,5): error CS0433: The imported type `Xbox.Services.Beam.BeamLoggingLevel' is defined multiple times

Looks like the Sources folder may be missing form the latest build? If I use the content of the sources folder from a previous build. I do not get those errors.

BeamManager.SingletonInstance.Participants still seems off

I made sure that I am using the latest version from the releases page.

I am still having some problems with the BeamManager.SingletonInstance.Participants. Here is the code that I am using to test it along with the console output.

I am going through all of the participants and setting them to the crowd group. Then I am going though a list of participants that I have stored in a list to change them over to the player group.

When I am iterating though the BeamManager.SingletonInstance.Participants, it always seems to do the first person 2x and leaves off the last person no mater how many participants there are. The first person is done first and last. So if there are 40 participants, then they are displayed first and then 40th.

void CreateTeams()
{
        Debug.Log("Creating Teams");
        Viewers();    //list all of the participants in the channel.
        Players();     //list all of the participants that have clicked the "Play Game" button.

        for (int cnt = 0; cnt < BeamManager.SingletonInstance.Participants.Count; cnt++)
        {
            BeamManager.SingletonInstance.Participants[cnt].Group = crowdGroup;
            Debug.Log("Adding: " + BeamManager.SingletonInstance.Participants[cnt].BeamUserName + " to group: " + BeamManager.SingletonInstance.Participants[cnt].Group.GroupID);
        }

        for (int cnt = 0; cnt < beamPlayers.Count; cnt++)
        {
            beamPlayers[cnt].Group = playerGroup;
            Debug.Log("Adding: " + beamPlayers[cnt].BeamUserName + " to group: " + beamPlayers[cnt].Group.GroupID);
        }
}

console

The highlighted line should be adding swishon to the crowdID but for some reason it is doing BurgZergArcade 2x.

Set spark costs

Add the ability to set the spark costs on buttons to the SDK.

Error accessing list of buttons for stream participant

I'm having an issue with the Unity plugin. I'm trying to access the list of participants and see what the last button they pressed was. When I try to get "foreach (InteractiveParticipant ipc in MixerInteractive.Participants)" I get an error trying to check their buttons.
KeyNotFoundException: The given key was not present in the dictionary.

string dbg = "";
if(MixerInteractive.Participants.Count > 0)
{
	foreach (InteractiveParticipant ipc in MixerInteractive.Participants)
	{
		dbg += ipc.UserName + ":" + ipc.State.ToString();
		if (ipc.Buttons.Count > 0)
		{
			foreach (InteractiveButtonControl b in ipc.Buttons)
			{
				dbg += "[ " + b.ButtonText + ":" + b.ButtonPressed + " ]";
			}
		}
	}
}

debugText.text = dbg;

Cannot change scenes (using the SetCurrentScene method)

Reported from Gitter: You cannot change scenes using the SetCurrentScene method. This will be fixed shortly. Note: you can switch scenes using the other methods (eg. what the groups example does) if you have hit this issue and do not want to wait for the updated SDK (ETA is today for that).

OAuth

Recently ran into an issue, where my unity program isn't receiving a short code to be displayed and in turn cannot be used. I'm not sure of the cause, but can it please be fixed soon or some feed back be given so I know I'm not completely insane

Access to chat

This keeps coming up as a scenario, so i'm opening an issue to track this.

Missing WebSocketSharp reference

Running on unity v2017.4.0f1 on OSX v10.13.3.

After adding this plugin I get the following error and the project will not compile or run.

Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs(47,7): error CS0246: The type or namespace name `WebSocketSharp' could not be found. Are you missing an assembly reference?

Any ideas what's going on here?

Cannot set cooldowns

When setting cooldowns on buttons the SDK logs an error saying "missing Etag"

Set Button Text, Cost, Per-User Cooldown

This is not an issue, rather a request for features if it's possible.

Right now I can only get the information from buttons, but I would like to be able to set the information dynamically as well. Ex:

MixerInteractive.Button(Button1ID).ButtonText = "Awesome Button";
Would allow me to change the Button Text from whatever it is to "Awesome Button"

MixerInteractive.Button(Button1ID).Cost = 500;
Would allow me to change the spark cost of the button to 500 Sparks.

MixerInteractive.Button(Button1ID).TriggerCooldown(userID, 5000);
Would allow me to set a 5 second cooldown on the button for the userID specified.

We are trying to build a simple voting system through interactive because currently the polling system cannot be accessed by users on mobile or xbox. By allowing the streamer to set these values on a client, we can still have a voting system for users on all platforms.

Please let me know if you guys could manage to squeeze this into the development cycle; I know you are all busy but I think these features could be a great addition!

Thanks,
Pete

Mixer Editor Button "Press Down" event giving an error

I updated my SDK to the latest. Repro Steps:

  1. Go Online, per the usual.
  2. Click Mixer -> Open Mixer Editor in the Unity Editor.
  3. The Control section is populated with the two controls that currently exist.
  4. Click a control, in this case "startGame" exists on my Default Scene.

Note: If I call the button directly via my own OnClick event tied to a UI element, it works fine.

Stack Trace:

Error: Error while processing method: giveInput UnityEngine.Debug:Log(Object) Microsoft.Mixer.InteractivityManager:Log(String, LoggingLevel) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:3234) Microsoft.Mixer.InteractivityManager:LogError(String) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:3223) Microsoft.Mixer.InteractivityManager:ProcessMethod(JsonReader) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:1445) Microsoft.Mixer.InteractivityManager:ProcessWebSocketMessage(String) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:1377) Microsoft.Mixer.InteractivityManager:SendMockWebSocketMessage(String) (at H:/GIT/WatchBeam/interactive-sdk-csharp/interactive-sdk-csharp/Source/Microsoft.Mixer.Shared.CSharp/InteractiveManager.cs:1318) InteractiveSettingsWindow:OnGUI() (at Assets/MixerInteractive/Source/Editor/InteractiveSettingsWindow.cs:268) UnityEditor.DockArea:OnGUI()

image

[Xbox One] MixerEraNativePlugin_GetXToken always retrieving token for first user signed in.

After switching active profile in game with previous user still signed in, MixerEraNativePlugin_GetXToken is retrieving a token for the previous user and not the current one. As an effect, despite the fact that active user changed, the previous one goes interactive.

Could you please enable an option to pass an user parameter for the function or tell us the service url so we could call GetTokenAndSignatureAsync ourselves and get the right token.

InteractivityManager.ClearPreviousControlState() ArgumentNullException

This occurred during a test interactive session. Unfortunately I didn't notice it until well after the problem occurred, and I do not have repro steps. If I can make it happen again I'll post repro. Thanks!

[Exception] ArgumentNullException: Argument cannot be null.
Parameter name: key
System.Collections.Generic.Dictionary`2[System.String,Microsoft.Mixer.InternalButtonCountState].get_Item()    /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:136

InteractivityManager.ClearPreviousControlState()    Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs:3627
3625:   foreach (string key in _buttonStatesKeys)
3626:   {
-->3627:       InternalButtonCountState oldButtonState = _buttonStates[key];
3628:       InternalButtonCountState newButtonState = new InternalButtonCountState();
3629:       newButtonState.PreviousCountOfButtonDownEvents = oldButtonState.CountOfButtonDownEvents;

InteractivityManager.DoWork()    Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs:1240
1238:   public void DoWork()
1239:   {
-->1240:       ClearPreviousControlState();
1241:       RaiseQueuedInteractiveEvents();
1242:       SendQueuedSetControlPropertyUpdates();

MixerInteractive.Update()    Assets/MixerInteractive/Source/Scripts/MixerInteractive.cs:472
470:   }
-->472:   InteractivityManager.SingletonInstance.DoWork();
474:   List<InteractiveEventArgs> processedEvents = new List<InteractiveEventArgs>();

"Log Level" setting resets on play

In the Mixer editor under advanced you can select the Log Level. By default this is on minimal, however you can change it to verbose (which is useful when I don't know why my buttons are not appearing). However when you launch the editor, that setting gets reset to minimal and I can't see if my authentication etc. is working.

Changing the Default SceneId or Group SceneId to one that doesn't exist causes Beam.OnGoInteractive to not fire

I know this is a silly one, I found this because I forgot to hit "save" in the Interactive Studio when I renamed my scene. Would be useful to get an error that tells me the SceneId doesn't exist to aid in troubleshooting.

Repro Steps:

  1. Add an event hook for Beam.OnGoInteractive.
  2. Add the Beam Manager to a scene (empty in this case).
  3. Change either the Default Scene Id or Group Scene Id to an Id that does not actually exist in the Interactive Studio.
  4. The event will never fire.

Errors building for UWP with Mixer and Xbox Live (Unity 5.6)

We have Mixer setup and working when we run the game through the editor. This is with Unity 5.6.3p3.

When we try to build a package with the "Windows Store" set as the current platform, we get this error:
Assets\MixerInteractive\Source\Scripts\MixerInteractive.cs(624,9): error CS0012: The type 'Dictionary<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

For UWP / Windows Store, we have the following settings:

  • Scripting backend: IL2CPP
  • Api compatibility level: .NET 4.6
  • SDK: Windows 10
  • Target device: any device
  • UWP Build type: D3D

(Changing the scripting backend gives us different errors than this, but we need to have it set to IL2CPP and .NET 4.6 in order to add Xbox Live support, as documented here: https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-partner/partner-unity-uwp-il2cpp)

API Implementation Progress

As this SDK is not yet fully feature complete with respect to the Mixer Interactive V2 specification it would be extremely useful to have a document detailing the currently implemented features, such as the one on the Typescript SDK.

This would be useful in documenting things like dynamic scene creation or participant input disabling not being implemented - so developers don't spend time looking for features that aren't there.

After calling MixerInteractive.GoInteractive, State gets stuck at "Initializing"

I'm not sure if that's a service or client issue, but I call the same simple steps found in the tutorial here (which boils down to MixerInteractive.GoInteractive) and added an EventHandler for OnInteractivityStateChanged.

For some reason, the MixerInteractive item will randomly (most of the time) wait forever after showing these state changes:

  • NotInitialized
  • NotInitialized
  • Initializing
    Then I can wait 5 minutes and nothing happens.

By killing/pressing play several times in a row, I will sometimes get it to Initialize and work properly. After that first success, it's mostly stable, but it's sadly frustrating when trying to develop a game...

Maybe I'm doing something wrong, but it feels like a bug to me.
Thanks,
-Sam

Duplicate participants if a participant leaves & joins

In the Unity SDK: BeamManager.SingletonInstance.Participants.Count does not remove a viewer from the list when they leave the channel, but will add them again if they come back to the channel creating a duplicate entry. If the app is restarted, the list returns to the correct number of viewers. Any advice would be helpful.

GoInteractive does not seem tot work

When I try the examples, I get the initial popup to go to mixer.com/go and fill in the code, I then give permission and restart the unity editor. However, then nothing happens, it just sits there without an error or anything in the log and on the channel I can see the stream being live but no buttons are underneath.

I have tried creating a new project in the mixer studio, and copying the new ID to the mixer config, but that did not work.

Any help or pointers to a potential problem would be highly appreciated.

InvalidOperationException using foreach with BeamManager.SingletonInstance.Participants

Using a foreach loop errors when trying to change the group for a participant, but works ok if you are using a for loop:

    foreach (BeamParticipant p in BeamManager.SingletonInstance.Participants)
    {
        if (beamParticipants.Contains(p))
            p.Group = playerGroup;
        else
            p.Group = crowdGroup;
    }

Error:
InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.List1+Enumerator[Xbox.Services.Beam.BeamParticipant].VerifyState () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:778) System.Collections.Generic.List1+Enumerator[Xbox.Services.Beam.BeamParticipant].MoveNext () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:784)
GameLobby.CreateTeams () (at Assets/Scripts/GameLobby.cs:142)
GameLobby.AddPlayer (Xbox.Services.Beam.BeamParticipant bp) (at Assets/Scripts/GameLobby.cs:119)
GameLobby.OnButton (System.Object sender, Xbox.Services.Beam.BeamButtonEventArgs e) (at Assets/Scripts/GameLobby.cs:174)
Microsoft.Beam.Update () (at Assets/Beam/Source/Scripts/Beam.cs:456)

Testing Interactivity on a Dev kit

We are trying to test interactivity on a xbox one dev kit but it looks like the interactivity is never enabled. We are calling MixerInteractive.GoInteractive() in code and on the browser we see a "Loading Interactive controls" thing popup when viewing the channel but the controls never load in completely. Is there some setup that is required before we can test on the dev kits ?

Cannot Change Group/Scene More Than Once

Description:
When trying to change a participant's group and thus the controls and scene being displayed to them, I run into problems. I am able to successfully change the Group and Scene the first time, however the second and all subsequent times do not appear to update the changes.

Desired Behavior:
When a user connects to the stream, they are automatically placed inside of the default scene. My default scene has several buttons which will change the Group and Scene of the user and display new controls. When any Group option button is selected, the new controls will appear. This part works fine.

Once in the new scene, there is a control button to return you to the default Group/Scene. This is the part that is broken.

Additional Info:
When running through and trying to debug my code, I've found out that the participant's group and scene information is being updated. What is not being updated is what Scene and controls the user actually sees on the Beam page.

My code is an absolute mess right now trying to get to the bottom of this, but I can provide a clean example if necessary.

Please reply if you've had a similar problem or may know how to help fix the issue, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.