• Api Documentation
  • Manual
Show / Hide Table of Contents
  • FishNet
    • InstanceFinder
  • FishNet.Authenticating
    • Authenticator
  • FishNet.Broadcast
    • IBroadcast
  • FishNet.Broadcast.Helping
    • BroadcastHandlerBase
  • FishNet.CodeGenerating
    • AllowMutableSyncTypeAttribute
    • CustomComparerAttribute
    • DefaultDeltaReaderAttribute
    • DefaultDeltaWriterAttribute
    • DefaultReaderAttribute
    • DefaultWriterAttribute
    • ExcludeSerializationAttribute
    • IncludeSerializationAttribute
    • NotSerializerAttribute
    • ReadUnallocatedAttribute
    • UseGlobalCustomSerializerAttribute
  • FishNet.Component.Animating
    • NetworkAnimator
  • FishNet.Component.ColliderRollback
    • ColliderRollback
    • RollbackManager
    • RollbackPhysicsType
  • FishNet.Component.Observing
    • DistanceCondition
    • GridCondition
    • GridEntry
    • HashGrid
    • HashGrid.GridAxes
    • HostOnlyCondition
    • MatchCondition
    • MatchCondition.ConditionCollections
    • OwnerOnlyCondition
    • SceneCondition
  • FishNet.Component.Ownership
    • PredictedOwner
    • PredictedSpawn
  • FishNet.Component.Prediction
    • NetworkCollider
    • NetworkCollider2D
    • NetworkCollision
    • NetworkCollision2D
    • NetworkTrigger
    • NetworkTrigger2D
    • OfflineRigidbody
    • Rigidbody2DState
    • RigidbodyPauser
    • RigidbodyState
    • RigidbodyStateExtensions
    • RigidbodyStateSerializers
    • RigidbodyType
  • FishNet.Component.Scenes
    • DefaultScene
  • FishNet.Component.Spawning
    • PlayerSpawner
  • FishNet.Component.Transforming
    • DetachableNetworkTickSmoother
    • MonoTickSmoother
    • NetworkTickSmoother
    • NetworkTransform
    • NetworkTransform.ComponentConfigurationType
    • NetworkTransform.GoalData
    • NetworkTransform.RateData
    • NetworkTransform.SnappedAxes
    • NetworkTransform.TransformData
    • NetworkTransform.TransformData.ExtrapolateState
    • SynchronizedProperty
  • FishNet.Component.Utility
    • BandwidthDisplay
    • PingDisplay
  • FishNet.Connection
    • NetworkConnection
    • NetworkConnectionExtensions
  • FishNet.Managing
    • NetworkManager
    • NetworkManager.HostIterationOrder
    • NetworkManager.PersistenceType
    • NetworkManagerExtensions
    • RemoteTimeoutType
  • FishNet.Managing.Client
    • ClientManager
    • ClientObjects
  • FishNet.Managing.Debugging
    • DebugManager
  • FishNet.Managing.Logging
    • LevelLoggingConfiguration
    • LoggingConfiguration
    • LoggingType
  • FishNet.Managing.Object
    • DualPrefab
    • ManagedObjects
  • FishNet.Managing.Observing
    • ObserverManager
  • FishNet.Managing.Predicting
    • PredictionManager
    • PredictionManager.PostPhysicsSyncTransformDel
    • PredictionManager.PostReconcileDel
    • PredictionManager.PostReplicateReplayDel
    • PredictionManager.PrePhysicsSyncTransformDel
    • PredictionManager.PreReconcileDel
    • PredictionManager.PreReplicateReplayDel
    • PredictionManager.ReconcileDel
    • PredictionManager.ReplicateReplayDel
    • ReplicateStateOrder
  • FishNet.Managing.Scened
    • ClientPresenceChangeEventArgs
    • DefaultSceneProcessor
    • EmptyStartScenesBroadcast
    • LoadOptions
    • LoadParams
    • LoadQueueData
    • PreferredScene
    • ReplaceOption
    • SceneLoadData
    • SceneLoadEndEventArgs
    • SceneLoadPercentEventArgs
    • SceneLoadStartEventArgs
    • SceneLookupData
    • SceneManager
    • SceneProcessorBase
    • SceneScopeType
    • SceneUnloadData
    • SceneUnloadEndEventArgs
    • SceneUnloadStartEventArgs
    • UnloadedScene
    • UnloadOptions
    • UnloadOptions.ServerUnloadMode
    • UnloadParams
    • UnloadQueueData
  • FishNet.Managing.Server
    • ClientConnectionChangeBroadcast
    • ConnectedClientsBroadcast
    • KickReason
    • ServerManager
    • ServerObjects
  • FishNet.Managing.Statistic
    • NetworkTrafficArgs
    • NetworkTraficStatistics
    • StatisticsManager
  • FishNet.Managing.Timing
    • EstimatedTick
    • EstimatedTick.OldTickOption
    • PhysicsMode
    • PreciseTick
    • PreciseTickExtensions
    • PreciseTickSerializer
    • TickRounding
    • TickType
    • TimeManager
  • FishNet.Managing.Transporting
    • IntermediateLayer
    • LatencySimulator
    • TransportManager
  • FishNet.Managing.Utility
    • Packets
  • FishNet.Object
    • ClientAttribute
    • DataOrderType
    • DespawnType
    • EmptyNetworkBehaviour
    • GlobalPreserveOwnedObjects
    • NetworkBehaviour
    • NetworkObject
    • NetworkObject.HostVisibilityUpdatedDelegate
    • NetworkObjectIdComparer
    • NetworkPreserveOwnedObjects
    • ObserversRpcAttribute
    • ReplicateState
    • ReplicateStateExtensions
    • RpcAttribute
    • ServerAttribute
    • ServerRpcAttribute
    • TargetRpcAttribute
    • TransformProperties
    • TransformPropertiesCls
    • TransformPropertiesFlag
    • TransformPropertiesOptionExtensions
  • FishNet.Object.Prediction
    • AdaptiveInterpolationType
    • ChildTransformTickSmoother
    • IReconcileData
    • IReplicateData
    • PredictionigidbodySerializers
    • PredictionRigidbody
    • PredictionRigidbody.AllForceData
    • PredictionRigidbody.EntryData
    • PredictionRigidbody.ForceApplicationType
    • PredictionRigidbody.IForceData
    • PredictionRigidbody2D
    • PredictionRigidbody2D.AllForceData
    • PredictionRigidbody2D.EntryData
    • PredictionRigidbody2D.ForceApplicationType
    • PredictionRigidbody2D2DSerializers
    • ReconcileAttribute
    • ReplicateAttribute
  • FishNet.Object.Synchronizing
    • ByteSyncVar
    • DoubleSyncVar
    • FloatSyncVar
    • ICustomSync
    • IntSyncVar
    • LongSyncVar
    • ReadPermission
    • SbyteSyncVar
    • ShortSyncVar
    • SyncDictionary<TKey, TValue>
    • SyncHashSet<T>
    • SyncList<T>
    • SyncObjectAttribute
    • SyncStopwatch
    • SyncStopwatch.SyncTypeChanged
    • SyncStopwatchOperation
    • SyncTimer
    • SyncTimer.SyncTypeChanged
    • SyncTimerOperation
    • SyncTypeSettings
    • SyncVarAttribute
    • UIntSyncVar
    • ULongSyncVar
    • UShortSyncVar
    • Vector2IntSyncVar
    • Vector2SyncVar
    • Vector3IntSyncVar
    • Vector3SyncVar
    • Vector4SyncVar
    • WritePermission
  • FishNet.Observing
    • HostVisibilityUpdateTypes
    • NetworkObserver
    • NetworkObserver.ConditionOverrideType
    • ObserverCondition
    • ObserverConditionType
  • FishNet.Serializing
    • AutoPackType
    • DeltaSerializerOption
    • DeltaSerializerOptionExtensions
    • PooledReader
    • PooledWriter
    • Reader
    • Reader.DataSource
    • ReaderPool
    • SubStream
    • Writer
    • WriterPool
  • FishNet.Transporting
    • Channel
    • ClientConnectionStateArgs
    • ClientReceivedDataArgs
    • ConnectedClientsArgs
    • IPAddressType
    • LocalConnectionState
    • RemoteConnectionState
    • RemoteConnectionStateArgs
    • ServerConnectionStateArgs
    • ServerReceivedDataArgs
    • Transport
    • TransportConsts
  • GameKit.Dependencies.Utilities
    • ApplicationState
    • Arrays
    • BasicQueue<T>
    • Booleans
    • Bytes
    • CanvaseGroups
    • CanvasGroupBlockingType
    • CollectionCaches<T>
    • CollectionCaches<T1, T2>
    • Collider2DExtensions
    • ColliderExtensions
    • DictionaryFN
    • Disks
    • Enums
    • Floats
    • Hashing
    • Ints
    • IOs
    • IResettable
    • IWeighted
    • Layers
    • LayoutGroups
    • Materials
    • Maths
    • ObjectCaches<T>
    • Objects
    • Particles
    • PointerMonoBehaviour
    • Quaternions
    • ResettableCollectionCaches<T>
    • ResettableCollectionCaches<T1, T2>
    • ResettableObjectCaches<T>
    • ResettableT1CollectionCaches<T1, T2>
    • ResettableT2CollectionCaches<T1, T2>
    • Strings
    • Transforms
    • UInts
    • Vectors
    • WeightedRandom
  • GameKit.Dependencies.Utilities.ObjectPooling
    • ListStack<GameObject>
    • ObjectPool
    • PoolData
  • GameKit.Dependencies.Utilities.ObjectPooling.Examples
    • Projectile
    • ProjectileSpawner
  • GameKit.Dependencies.Utilities.Types
    • ByteRange
    • CanvasGroupFader
    • CanvasGroupFader.FadeGoalType
    • CanvasTracker
    • DDOL
    • FloatRange
    • FloatRange2D
    • IntRange
    • IOrderable
    • RectTransformResizer
    • RectTransformResizer.ResizeData
    • RectTransformResizer.ResizeDelegate
    • ResettableRingBuffer<T>
    • ResettableRingBuffer<T>.Enumerator
    • RingBuffer<T>
    • RingBuffer<T>.Enumerator
    • SceneAttribute
    • ScrollbarValueSetter
    • SingletonScriptableObject<T>
    • SmoothCameraTarget
    • TimedOperation
    • UIntRange
    • Vector2Range
  • GameKit.Dependencies.Utilities.Types.CanvasContainers
    • ButtonData
    • ButtonData.PressedDelegate
    • FloatingContainer
    • FloatingImage
    • ImageButtonData
    • ResizableContainer
  • GameKit.Dependencies.Utilities.Types.OptionMenuButtons
    • FloatingOptions

Class ManagedObjects

Inheritance
System.Object
ManagedObjects
ClientObjects
ServerObjects
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FishNet.Managing.Object
Assembly: FishNet.Runtime.dll
Syntax
public abstract class ManagedObjects

Fields

SceneObjects_Internal

Objects in currently loaded scenes. These objects can be active or inactive. Key is the objectId while value is the object. Key is not the same as NetworkObject.ObjectId.

Declaration
protected Dictionary<ulong, NetworkObject> SceneObjects_Internal
Field Value
Type Description
System.Collections.Generic.Dictionary<System.UInt64, NetworkObject>

Spawned

NetworkObjects which are currently active.

Declaration
public Dictionary<int, NetworkObject> Spawned
Field Value
Type Description
System.Collections.Generic.Dictionary<System.Int32, NetworkObject>

Properties

NetworkManager

NetworkManager handling this.

Declaration
protected NetworkManager NetworkManager { get; }
Property Value
Type Description
NetworkManager

SceneObjects

Objects in currently loaded scenes. These objects can be active or inactive. Key is the objectId while value is the object. Key is not the same as NetworkObject.ObjectId.

Declaration
public IReadOnlyDictionary<ulong, NetworkObject> SceneObjects { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyDictionary<System.UInt64, NetworkObject>

Methods

AddToSceneObjects(NetworkObject)

Adds a NetworkObject to SceneObjects.

Declaration
protected void AddToSceneObjects(NetworkObject nob)
Parameters
Type Name Description
NetworkObject nob

CanPredictedDespawn(NetworkObject, NetworkConnection, Boolean, Reader)

Returns if a NetworkObject meets basic criteria for being predicted despawned.

Declaration
protected bool CanPredictedDespawn(NetworkObject nob, NetworkConnection despawner, bool asServer, Reader reader = null)
Parameters
Type Name Description
NetworkObject nob
NetworkConnection despawner
System.Boolean asServer
Reader reader

If not null reader will be cleared on error.

Returns
Type Description
System.Boolean

CanPredictedSpawn(NetworkObject, NetworkConnection, Boolean, Reader)

Returns if a NetworkObject meets basic criteria for being predicted spawned.

Declaration
protected bool CanPredictedSpawn(NetworkObject nob, NetworkConnection spawner, bool asServer, Reader reader = null)
Parameters
Type Name Description
NetworkObject nob
NetworkConnection spawner
System.Boolean asServer
Reader reader

If not null reader will be cleared on error.

Returns
Type Description
System.Boolean

GetNextNetworkObjectId(Boolean)

Returns the next ObjectId to use.

Declaration
protected virtual int GetNextNetworkObjectId(bool errorCheck = true)
Parameters
Type Name Description
System.Boolean errorCheck
Returns
Type Description
System.Int32

GetSpawnedNetworkObject(Int32)

Finds a NetworkObject within Spawned.

Declaration
protected NetworkObject GetSpawnedNetworkObject(int objectId)
Parameters
Type Name Description
System.Int32 objectId
Returns
Type Description
NetworkObject

Initialize(NetworkManager)

Declaration
protected virtual void Initialize(NetworkManager manager)
Parameters
Type Name Description
NetworkManager manager

InitializePrefab(NetworkObject, Int32, Nullable<UInt16>)

Initializes a prefab, not to be mistaken for initializing a spawned object.

Declaration
public static void InitializePrefab(NetworkObject prefab, int index, ushort? collectionId = null)
Parameters
Type Name Description
NetworkObject prefab

Prefab to initialize.

System.Int32 index

Index within spawnable prefabs.

System.Nullable<System.UInt16> collectionId

ReadSceneObjectId(PooledReader, out UInt64)

Finishes reading a scene object.

Declaration
protected void ReadSceneObjectId(PooledReader reader, out ulong sceneId)
Parameters
Type Name Description
PooledReader reader
System.UInt64 sceneId

ReadTransformProperties(Reader, out Nullable<Vector3>, out Nullable<Quaternion>, out Nullable<Vector3>)

Reads and outputs a transforms values.

Declaration
protected void ReadTransformProperties(Reader reader, out Vector3? localPosition, out Quaternion? localRotation, out Vector3? localScale)
Parameters
Type Name Description
Reader reader
System.Nullable<UnityEngine.Vector3> localPosition
System.Nullable<UnityEngine.Quaternion> localRotation
System.Nullable<UnityEngine.Vector3> localScale

RemoveFromSceneObjects(NetworkObject)

Removes a NetworkObject from SceneObjects.

Declaration
protected void RemoveFromSceneObjects(NetworkObject nob)
Parameters
Type Name Description
NetworkObject nob

RemoveFromSceneObjects(UInt64)

Removes a NetworkObject from SceneObjects.

Declaration
protected void RemoveFromSceneObjects(ulong sceneId)
Parameters
Type Name Description
System.UInt64 sceneId

RemoveFromSpawned(NetworkObject, Boolean, Boolean)

Removes a NetworkedObject from spawned.

Declaration
protected virtual void RemoveFromSpawned(NetworkObject nob, bool unexpectedlyDestroyed, bool asServer)
Parameters
Type Name Description
NetworkObject nob
System.Boolean unexpectedlyDestroyed
System.Boolean asServer

SceneManager_sceneLoaded(Scene, LoadSceneMode)

Called when a scene is loaded.

Declaration
protected virtual void SceneManager_sceneLoaded(Scene s, LoadSceneMode arg1)
Parameters
Type Name Description
UnityEngine.SceneManagement.Scene s
UnityEngine.SceneManagement.LoadSceneMode arg1

SkipDataLength(UInt16, PooledReader, Int32, Int32)

Tries to skip data length for a packet.

Declaration
protected void SkipDataLength(ushort packetId, PooledReader reader, int dataLength, int rpcLinkObjectId = -1)
Parameters
Type Name Description
System.UInt16 packetId
PooledReader reader
System.Int32 dataLength
System.Int32 rpcLinkObjectId

WriteChangedTransformProperties(NetworkObject, Boolean, Writer)

Writes changed transform proeprties to writer.

Declaration
protected void WriteChangedTransformProperties(NetworkObject nob, bool sceneObject, Writer headerWriter)
Parameters
Type Name Description
NetworkObject nob
System.Boolean sceneObject
Writer headerWriter

WriteDespawn(NetworkObject, DespawnType, Writer)

Writes a despawn.

Declaration
protected void WriteDespawn(NetworkObject nob, DespawnType despawnType, Writer everyoneWriter)
Parameters
Type Name Description
NetworkObject nob
DespawnType despawnType
Writer everyoneWriter
In This Article
Back to top Generated by DocFX