@@ -57,6 +57,11 @@ public class NetworkPrefab
5757 /// </summary>
5858 public GameObject OverridingTargetPrefab ;
5959
60+ /// <summary>
61+ /// Compares this NetworkPrefab with another to determine equality
62+ /// </summary>
63+ /// <param name="other">The NetworkPrefab to compare against</param>
64+ /// <returns>True if all fields match between the two NetworkPrefabs, false otherwise</returns>
6065 public bool Equals ( NetworkPrefab other )
6166 {
6267 return Override == other . Override &&
@@ -66,6 +71,12 @@ public bool Equals(NetworkPrefab other)
6671 OverridingTargetPrefab == other . OverridingTargetPrefab ;
6772 }
6873
74+ /// <summary>
75+ /// Gets the GlobalObjectIdHash of the source prefab based on the current override settings
76+ /// </summary>
77+ /// <returns>The hash value identifying the source prefab</returns>
78+ /// <exception cref="InvalidOperationException">Thrown when required prefab references are missing or invalid</exception>
79+ /// <exception cref="ArgumentOutOfRangeException">Thrown when Override has an invalid value</exception>
6980 public uint SourcePrefabGlobalObjectIdHash
7081 {
7182 get
@@ -98,6 +109,12 @@ public uint SourcePrefabGlobalObjectIdHash
98109 }
99110 }
100111
112+ /// <summary>
113+ /// Gets the GlobalObjectIdHash of the target prefab when using prefab overrides
114+ /// </summary>
115+ /// <returns>The hash value identifying the target prefab, or 0 if no override is set</returns>
116+ /// <exception cref="InvalidOperationException">Thrown when required prefab references are missing or invalid</exception>
117+ /// <exception cref="ArgumentOutOfRangeException">Thrown when Override has an invalid value</exception>
101118 public uint TargetPrefabGlobalObjectIdHash
102119 {
103120 get
@@ -122,6 +139,11 @@ public uint TargetPrefabGlobalObjectIdHash
122139 }
123140 }
124141
142+ /// <summary>
143+ /// Validates the NetworkPrefab configuration to ensure all required fields are properly set
144+ /// </summary>
145+ /// <param name="index">Optional index used for error reporting when validating lists of prefabs</param>
146+ /// <returns>True if the NetworkPrefab is valid and ready for use, false otherwise</returns>
125147 public bool Validate ( int index = - 1 )
126148 {
127149 NetworkObject networkObject ;
@@ -224,6 +246,10 @@ public bool Validate(int index = -1)
224246 return true ;
225247 }
226248
249+ /// <summary>
250+ /// Returns a string representation of this NetworkPrefab's source and target hash values
251+ /// </summary>
252+ /// <returns>A string containing the source and target hash values</returns>
227253 public override string ToString ( )
228254 {
229255 return $ "{{SourceHash: { SourceHashToOverride } , TargetHash: { TargetPrefabGlobalObjectIdHash } }}";
0 commit comments