这是indexloc提供的服务,不要输入任何密码
Skip to content

LocalParticipant.SetAttributes does not work in v2.0 SDK. Attributes are never applied. #64

@chuckills

Description

@chuckills

SDK v2.0.1
Unity v6000.0.23f1

Trying to add new attributes to the LocalParticipant fails.

  • User token has CanUpdateOwnMetadata set true.
  • No error is seen in the browser console unless a call to access the attribute is made
  • Setting participant Name or Metadata functions as expected

Calling a count of the participant attributes and new attribute JSMap argument using the following snippet produces the output at bottom of the post, which seems like something is wrong with the underlying object

Debug.Log($"Participant.attributes count before: {Participant.attributes.Count}");
JSMap<string, string> attributes = new JSMap<string, string>();
attributes.Add("MyAttribute", "myValue");
Debug.Log($"attributes count: {attributes.Count}");
yield return Participant.SetAttributes(attributes);
Debug.Log($"Participant.attributes count after: {Participant.attributes.Count}");

This is the output:

Participant.attributes count before: -2147483648
attributes count: 1
Participant.attributes count after: -2147483648

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions