Skip to main content

Unity.Netcode.NetworkPrefab

Class that represents a NetworkPrefab

Inheritance

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Inherited Members

Object.Equals(Object)

Object.Equals(Object, Object)

Object.ReferenceEquals(Object, Object)

Object.GetHashCode()

Object.GetType()

Object.MemberwiseClone()

Namespace: System.Dynamic.ExpandoObject

Assembly: Netcode.dll

Syntax

[Serializable]
public class NetworkPrefab

Fields

Override

The override settings for this NetworkPrefab

Declaration

public NetworkPrefabOverride Override

Field Value

TypeDescription
NetworkPrefabOverride

OverridingTargetPrefab

The prefab to replace (override) the source prefab with

Declaration

public GameObject OverridingTargetPrefab

Field Value

TypeDescription
GameObject

Prefab

Asset reference of the network prefab

Declaration

public GameObject Prefab

Field Value

TypeDescription
GameObject

SourceHashToOverride

Used when hash is selected for the source prefab to override value (i.e. a direct reference is not possible such as in a multi-project pattern)

Declaration

public uint SourceHashToOverride

Field Value

TypeDescription
System.UInt32

SourcePrefabToOverride

Used when prefab is selected for the source prefab to override value (i.e. direct reference, the prefab is within the same project) We keep a separate value as the user might want to have something different than the default Prefab for the SourcePrefabToOverride

Declaration

public GameObject SourcePrefabToOverride

Field Value

TypeDescription
GameObject

Properties

SourcePrefabGlobalObjectIdHash

Declaration

public uint SourcePrefabGlobalObjectIdHash { get; }

Property Value

TypeDescription
System.UInt32

TargetPrefabGlobalObjectIdHash

Declaration

public uint TargetPrefabGlobalObjectIdHash { get; }

Property Value

TypeDescription
System.UInt32

Methods

Equals(NetworkPrefab)

Declaration

public bool Equals(NetworkPrefab other)

Parameters

TypeNameDescription
NetworkPrefabother

Returns

TypeDescription
System.Boolean

ToString()

Declaration

public override string ToString()

Returns

TypeDescription
System.String

Overrides

System.Object.ToString()

Validate(Int32)

Declaration

public bool Validate(int index = -1)

Parameters

TypeNameDescription
System.Int32index

Returns

TypeDescription
System.Boolean