File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
MLAPI/NetworkingManagerComponents/Core Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,26 @@ public static int GetNetworkedPrefabIndexOfHash(ulong hash)
124
124
125
125
return - 1 ;
126
126
}
127
+
128
+ /// <summary>
129
+ /// Returns the prefab hash for the networked prefab with a given index
130
+ /// </summary>
131
+ /// <param name="index">The networked prefab index</param>
132
+ /// <returns>The prefab hash for the given prefab index</returns>
133
+ public static ulong GetPrefabHashFromIndex ( int index )
134
+ {
135
+ return NetworkingManager . Singleton . NetworkConfig . NetworkedPrefabs [ index ] . Hash ;
136
+ }
137
+
138
+ /// <summary>
139
+ /// Returns the prefab hash for a given prefab hash generator
140
+ /// </summary>
141
+ /// <param name="generator">The prefab hash generator</param>
142
+ /// <returns>The hash for the given generator</returns>
143
+ public static ulong GetPrefabHashFromGenerator ( string generator )
144
+ {
145
+ return generator . GetStableHash64 ( ) ;
146
+ }
127
147
128
148
/// <summary>
129
149
/// Returns the local player object or null if one does not exist
You can’t perform that action at this time.
0 commit comments