docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum VisibilityPropertyOptions

    Indicates for whom the property should be visible.

    Namespace: Unity.Services.Multiplayer
    Assembly: Unity.Services.Multiplayer.dll
    Syntax
    public enum VisibilityPropertyOptions
    Remarks

    A public property is visible to everyone and is included in query results.
    A member property is only visible to the members of the session (in other words, those who have successfully joined).
    A private property is only visible to the member who set it. Only the host can set and see private session properties.
    For more information, see data access table.

    Use in conjunction with the following methods:
    • SetProperty(string, SessionProperty)
    • SetProperties(Dictionary<string, SessionProperty>)
    • SetProperty(string, PlayerProperty)
    • SetProperties(Dictionary<string, PlayerProperty>)

    Examples

    Creating a public session property

    var publicSessionProperty = new SessionProperty("value", VisibilityPropertyOptions.Public);

    Creating a private player property

    var privatePlayerProperty = new PlayerProperty("value", VisibilityPropertyOptions.Private);

    Fields

    Name Description
    Member

    Enum Member for value: member

    Private

    Enum Private for value: private

    Public

    Enum Public for value: public

    See Also
    SessionProperty
    PlayerProperty
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)