Skip to content

Commit 98dbffc

Browse files
author
Jazz23
committed
Add implicit operator
1 parent 0efba10 commit 98dbffc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Assets/FishNet/Runtime/Object/NetworkBehaviour/NetworkBehaviour.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public byte ComponentIndex
6060
/// NetworkObject this behaviour is for.
6161
/// </summary>
6262
public NetworkObject NetworkObject => _networkObjectCache;
63+
public static implicit operator NetworkObject(NetworkBehaviour nb) => nb._networkObjectCache;
6364
#endregion
6465

6566
#region Private.

0 commit comments

Comments
 (0)