docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkVariablePermissionTests

    Inheritance
    object
    NetcodeIntegrationTest
    NetworkVariablePermissionTests
    Inherited Members
    NetcodeIntegrationTest.s_GlobalTimeoutHelper
    NetcodeIntegrationTest.s_DefaultWaitForTick
    NetcodeIntegrationTest.NetcodeLogAssert
    NetcodeIntegrationTest.s_GlobalNetworkObjects
    NetcodeIntegrationTest.k_DefaultTickRate
    NetcodeIntegrationTest.m_CreateServerFirst
    NetcodeIntegrationTest.m_PlayerPrefab
    NetcodeIntegrationTest.m_ServerNetworkManager
    NetcodeIntegrationTest.m_ClientNetworkManagers
    NetcodeIntegrationTest.m_PlayerNetworkObjects
    NetcodeIntegrationTest.m_UseHost
    NetcodeIntegrationTest.m_TargetFrameRate
    NetcodeIntegrationTest.RegisterNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DeregisterNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DeregisterNetworkObject(ulong, ulong)
    NetcodeIntegrationTest.VerboseDebug(string)
    NetcodeIntegrationTest.OnSetVerboseDebug()
    NetcodeIntegrationTest.OnSetIntegrationTestMode()
    NetcodeIntegrationTest.OnOneTimeSetup()
    NetcodeIntegrationTest.OneTimeSetup()
    NetcodeIntegrationTest.OnSetup()
    NetcodeIntegrationTest.OnInlineSetup()
    NetcodeIntegrationTest.SetUp()
    NetcodeIntegrationTest.OnCreatePlayerPrefab()
    NetcodeIntegrationTest.OnPlayerPrefabGameObjectCreated()
    NetcodeIntegrationTest.CreateServerAndClients()
    NetcodeIntegrationTest.OnNewClientCreated(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStarted(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStartedAndConnected(NetworkManager)
    NetcodeIntegrationTest.ShouldWaitForNewClientToConnect(NetworkManager)
    NetcodeIntegrationTest.CreateAndStartNewClient()
    NetcodeIntegrationTest.CreateAndStartNewClientWithTimeTravel()
    NetcodeIntegrationTest.StopOneClient(NetworkManager, bool)
    NetcodeIntegrationTest.StopOneClientWithTimeTravel(NetworkManager, bool)
    NetcodeIntegrationTest.SetTimeTravelSimulatedLatency(float)
    NetcodeIntegrationTest.SetTimeTravelSimulatedDropRate(float)
    NetcodeIntegrationTest.SetTimeTravelSimulatedLatencyJitter(float)
    NetcodeIntegrationTest.CreateServerAndClients(int)
    NetcodeIntegrationTest.CanStartServerAndClients()
    NetcodeIntegrationTest.OnStartedServerAndClients()
    NetcodeIntegrationTest.OnTimeTravelStartedServerAndClients()
    NetcodeIntegrationTest.OnTimeTravelServerAndClientsConnected()
    NetcodeIntegrationTest.ClientNetworkManagerPostStartInit()
    NetcodeIntegrationTest.StartServerAndClients()
    NetcodeIntegrationTest.StartServerAndClientsWithTimeTravel()
    NetcodeIntegrationTest.CanClientsLoad()
    NetcodeIntegrationTest.CanClientsUnload()
    NetcodeIntegrationTest.DeRegisterSceneManagerHandler()
    NetcodeIntegrationTest.RegisterSceneManagerHandler()
    NetcodeIntegrationTest.OnCanSceneCleanUpUnload(Scene)
    NetcodeIntegrationTest.ShutdownAndCleanUp()
    NetcodeIntegrationTest.OnTearDown()
    NetcodeIntegrationTest.OnInlineTearDown()
    NetcodeIntegrationTest.TearDown()
    NetcodeIntegrationTest.OnOneTimeTearDown()
    NetcodeIntegrationTest.OneTimeTearDown()
    NetcodeIntegrationTest.CanDestroyNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DestroySceneNetworkObjects()
    NetcodeIntegrationTest.EnableMessageLogging()
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(Func<bool>, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOutWithTimeTravel(Func<bool>, int)
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(IConditionalPredicate, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOutWithTimeTravel(IConditionalPredicate, int)
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOutWithTimeTravel(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut()
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOutWithTimeTravel()
    NetcodeIntegrationTest.CreateNetworkObjectPrefab(string)
    NetcodeIntegrationTest.SpawnObject(GameObject, NetworkManager, bool)
    NetcodeIntegrationTest.SpawnObjects(GameObject, NetworkManager, int, bool)
    NetcodeIntegrationTest.AssertOnTimeout(string, TimeoutHelper)
    NetcodeIntegrationTest.WaitForTicks(NetworkManager, int)
    NetcodeIntegrationTest.TimeTravel(double, int)
    NetcodeIntegrationTest.GetTickRate()
    NetcodeIntegrationTest.GetFrameRate()
    NetcodeIntegrationTest.ConfigureFramesPerTick()
    NetcodeIntegrationTest.TimeTravelAdvanceTick()
    NetcodeIntegrationTest.TimeTravelToNextTick()
    NetcodeIntegrationTest.SimulateOneFrame()
    NetcodeIntegrationTest.TotalClients
    NetcodeIntegrationTest.m_EnableVerboseDebug
    NetcodeIntegrationTest.m_BypassConnectionTimeout
    NetcodeIntegrationTest.m_EnableTimeTravel
    NetcodeIntegrationTest.m_SetupIsACoroutine
    NetcodeIntegrationTest.m_TearDownIsACoroutine
    NetcodeIntegrationTest.LogAllMessages
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Netcode.RuntimeTests
    Assembly: Unity.Netcode.RuntimeTests.dll
    Syntax
    [TestFixtureSource("TestDataSource")]
    public class NetworkVariablePermissionTests : NetcodeIntegrationTest

    Constructors

    NetworkVariablePermissionTests(HostOrServer)

    Declaration
    public NetworkVariablePermissionTests(NetcodeIntegrationTest.HostOrServer hostOrServer)
    Parameters
    Type Name Description
    NetcodeIntegrationTest.HostOrServer hostOrServer

    Properties

    NumberOfClients

    Declaration
    protected override int NumberOfClients { get; }
    Property Value
    Type Description
    int
    Overrides
    NetcodeIntegrationTest.NumberOfClients

    Methods

    ClientCannotChangeServerWritableNetVar()

    Declaration
    [UnityTest]
    public IEnumerator ClientCannotChangeServerWritableNetVar()
    Returns
    Type Description
    IEnumerator

    ClientChangesOwnerWritableNetVar()

    Declaration
    [UnityTest]
    public IEnumerator ClientChangesOwnerWritableNetVar()
    Returns
    Type Description
    IEnumerator

    ClientOwnerWithReadWriteChangesNetVar()

    This tests the scenario where a client owner has both read and write permissions set. The server should be the only instance that can read the NetworkVariable. ServerCannotChangeOwnerWritableNetVar performs the same check to make sure the server cannot write to a client owner NetworkVariable with owner write permissions.

    Declaration
    [UnityTest]
    public IEnumerator ClientOwnerWithReadWriteChangesNetVar()
    Returns
    Type Description
    IEnumerator

    OnServerAndClientsConnected()

    Declaration
    protected override IEnumerator OnServerAndClientsConnected()
    Returns
    Type Description
    IEnumerator
    Overrides
    NetcodeIntegrationTest.OnServerAndClientsConnected()

    OnServerAndClientsCreated()

    Declaration
    protected override void OnServerAndClientsCreated()
    Overrides
    NetcodeIntegrationTest.OnServerAndClientsCreated()

    ServerCannotChangeOwnerWritableNetVar()

    Declaration
    [UnityTest]
    public IEnumerator ServerCannotChangeOwnerWritableNetVar()
    Returns
    Type Description
    IEnumerator

    ServerChangesOwnerWritableNetVar()

    Declaration
    [UnityTest]
    public IEnumerator ServerChangesOwnerWritableNetVar()
    Returns
    Type Description
    IEnumerator

    ServerChangesServerWritableNetVar()

    Declaration
    [UnityTest]
    public IEnumerator ServerChangesServerWritableNetVar()
    Returns
    Type Description
    IEnumerator

    TestDataSource()

    Declaration
    public static IEnumerable<TestFixtureData> TestDataSource()
    Returns
    Type Description
    IEnumerable<TestFixtureData>
    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)