• 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 InstanceFinder

Used to globally get information from the first found instance of NetworkManager.

Inheritance
System.Object
InstanceFinder
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
Assembly: FishNet.Runtime.dll
Syntax
public static class InstanceFinder

Properties

ClientManager

Returns the first instance of ClientManager.

Declaration
public static ClientManager ClientManager { get; }
Property Value
Type Description
ClientManager

IsClient

Declaration
[Obsolete("Use IsClientStarted. Note the difference between IsClientInitialized and IsClientStarted.")]
public static bool IsClient { get; }
Property Value
Type Description
System.Boolean

IsClientOnly

Declaration
[Obsolete("Use IsClientOnlyStarted. Note the difference between IsClientOnlyInitialized and IsClientOnlyStarted.")]
public static bool IsClientOnly { get; }
Property Value
Type Description
System.Boolean

IsClientOnlyStarted

True if only the client is started and authenticated.

Declaration
public static bool IsClientOnlyStarted { get; }
Property Value
Type Description
System.Boolean

IsClientStarted

True if the client is started and authenticated.

Declaration
public static bool IsClientStarted { get; }
Property Value
Type Description
System.Boolean

IsHost

Declaration
[Obsolete("Use IsHostStarted. Note the difference between IsHostInitialized and IsHostStarted.")]
public static bool IsHost { get; }
Property Value
Type Description
System.Boolean

IsHostStarted

True if client and server are started.

Declaration
public static bool IsHostStarted { get; }
Property Value
Type Description
System.Boolean

IsOffline

True if client nor server are started.

Declaration
public static bool IsOffline { get; }
Property Value
Type Description
System.Boolean

IsServer

Declaration
[Obsolete("Use IsServerStarted. Note the difference between IsServerInitialized and IsServerStarted.")]
public static bool IsServer { get; }
Property Value
Type Description
System.Boolean

IsServerOnly

Declaration
[Obsolete("Use IsServerOnlyStarted. Note the difference between IsServerOnlyInitialized and IsServerOnlyStarted.")]
public static bool IsServerOnly { get; }
Property Value
Type Description
System.Boolean

IsServerOnlyStarted

True if only the server is started.

Declaration
public static bool IsServerOnlyStarted { get; }
Property Value
Type Description
System.Boolean

IsServerStarted

True if the server is active.

Declaration
public static bool IsServerStarted { get; }
Property Value
Type Description
System.Boolean

NetworkManager

Returns the first found NetworkManager instance.

Declaration
public static NetworkManager NetworkManager { get; }
Property Value
Type Description
NetworkManager

PredictionManager

Returns the first instance of PredictionManager.

Declaration
public static PredictionManager PredictionManager { get; }
Property Value
Type Description
PredictionManager

RollbackManager

Returns the first instance of RollbackManager.

Declaration
public static RollbackManager RollbackManager { get; }
Property Value
Type Description
RollbackManager

SceneManager

Returns the first instance of SceneManager.

Declaration
public static SceneManager SceneManager { get; }
Property Value
Type Description
SceneManager

ServerManager

Returns the first instance of ServerManager.

Declaration
public static ServerManager ServerManager { get; }
Property Value
Type Description
ServerManager

StatisticsManager

Returns the first instance of StatisticsManager.

Declaration
public static StatisticsManager StatisticsManager { get; }
Property Value
Type Description
StatisticsManager

TimeManager

Returns the first instance of TimeManager.

Declaration
public static TimeManager TimeManager { get; }
Property Value
Type Description
TimeManager

TransportManager

Returns the first instance of TransportManager.

Declaration
public static TransportManager TransportManager { get; }
Property Value
Type Description
TransportManager

Methods

GetInstance<T>()

Returns class of type if found within CodegenBase classes.

Declaration
public static T GetInstance<T>()
    where T : Component
Returns
Type Description
T
Type Parameters
Name Description
T

HasInstance<T>()

Returns if class of type is registered with the NetworkManager.

Declaration
public static bool HasInstance<T>()
    where T : Component
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

Type to check for.

RegisterInstance<T>(T, Boolean)

Registers a new component to this NetworkManager.

Declaration
public static void RegisterInstance<T>(T component, bool replace = true)
    where T : Component
Parameters
Type Name Description
T component

Reference of the component being registered.

System.Boolean replace

True to replace existing references.

Type Parameters
Name Description
T

Type to register.

RegisterInvokeOnInstance<T>(Action<Component>)

Registers to invoke an action when a specified component becomes registered. Action will invoke immediately if already registered.

Declaration
public static void RegisterInvokeOnInstance<T>(Action<Component> handler)
    where T : Component
Parameters
Type Name Description
System.Action<UnityEngine.Component> handler

Action to invoke.

Type Parameters
Name Description
T

Component type.

TryGetInstance<T>(out T)

Returns class of type from registered instances.

Declaration
public static bool TryGetInstance<T>(out T component)
    where T : Component
Parameters
Type Name Description
T component

Outputted component.

Returns
Type Description
System.Boolean

True if was able to get instance.

Type Parameters
Name Description
T

Type to get.

TryRegisterInstance<T>(T)

Tries to registers a new component to this NetworkManager. This will not register the instance if another already exists.

Declaration
public static bool TryRegisterInstance<T>(T component)
    where T : Component
Parameters
Type Name Description
T component

Reference of the component being registered.

Returns
Type Description
System.Boolean

True if was able to register, false if an instance is already registered.

Type Parameters
Name Description
T

Type to register.

UnregisterInstance<T>()

Unregisters a component from this NetworkManager.

Declaration
public static void UnregisterInstance<T>()
    where T : Component
Type Parameters
Name Description
T

Type to unregister.

UnregisterInvokeOnInstance<T>(Action<Component>)

Unrgisters to invoke an action when a specified component becomes registered. Action will invoke immediately if already registered.

Declaration
public static void UnregisterInvokeOnInstance<T>(Action<Component> handler)
    where T : Component
Parameters
Type Name Description
System.Action<UnityEngine.Component> handler

Action to invoke.

Type Parameters
Name Description
T

Component type.

In This Article
Back to top Generated by DocFX