public void RegisterNetObjectCreator(NetObjectType type, Func <GameObject> creator) { netObjectCreateDict.Add(type, creator); }
public NetworkObject(NetObjectType type) { requestType = type; }
private void AddStationChecked(object sender, RoutedEventArgs e) { _objectType = NetObjectType.TypeStation; }
private void AddBusChecked(object sender, RoutedEventArgs e) { _objectType = NetObjectType.TypeBus; }
// Do this in Awake public void RegisterChild(NetObjectType type, Action <INetObject> onCreateChild, Action <INetObject, NetUpdate> onUpdateChild, Action <INetObject> onDestroyChild) { registries.Add(type, new object[] { onCreateChild, onUpdateChild, onDestroyChild }); }