@@ -113,6 +113,9 @@ internal set
113
113
114
114
public delegate bool ObserverDelegate ( uint clientId ) ;
115
115
116
+ /// <summary>
117
+ /// Delegate invoked when the MLAPI needs to know if the object should be visible to a client, if null it will assume true
118
+ /// </summary>
116
119
public ObserverDelegate CheckObjectVisibility = null ;
117
120
118
121
/// <summary>
@@ -123,11 +126,21 @@ internal set
123
126
124
127
internal readonly HashSet < uint > observers = new HashSet < uint > ( ) ;
125
128
129
+ /// <summary>
130
+ /// Whether or not this object is visible to a specific client
131
+ /// </summary>
132
+ /// <param name="clientId">The clientId of the client</param>
133
+ /// <returns>True if the client knows about the object</returns>
126
134
public bool IsNetworkVisibleTo ( uint clientId )
127
135
{
128
136
return observers . Contains ( clientId ) ;
129
137
}
130
138
139
+ /// <summary>
140
+ /// Shows a previously hidden object to a client
141
+ /// </summary>
142
+ /// <param name="clientId">The client to show the object to</param>
143
+ /// <param name="payload">An optional payload to send as part of the spawn</param>
131
144
public void NetworkShow ( uint clientId , Stream payload = null )
132
145
{
133
146
if ( ! NetworkingManager . Singleton . IsServer )
@@ -179,6 +192,10 @@ public void NetworkShow(uint clientId, Stream payload = null)
179
192
}
180
193
}
181
194
195
+ /// <summary>
196
+ /// Hides a object from a specific client
197
+ /// </summary>
198
+ /// <param name="clientId">The client to hide the object for</param>
182
199
public void NetworkHide ( uint clientId )
183
200
{
184
201
if ( ! NetworkingManager . Singleton . IsServer )
0 commit comments