GetUserInstance
Namespace: SynicSugar.P2P
Class: ConnectHub
public T GetUserInstance<T>(UserId id)
Description
Get a target instance registered to ConnectHub.
If we want to use this, pass true to NetworkPlayer class attributes.
using SynicSugar.P2P;
[NetworkPlayer(true)]
public partial class p2pSample {
}
public class p2pSample2 {
void p2pSampleMethod(){
p2pSample pSample = ConnectHub.Instance.GetUserInstance<p2pSample>(targetId);
}
}