public bool WriteRoute(byte[] data, int dataLen, RouteInfoBase routeInfo) { if (data == null) { return(false); } if (!Connected) { ADebug.LogError("WriteRoute but there's no Connection"); return(false); } if (dataLen > data.Length || dataLen < 0) { dataLen = data.Length; } byte[] buf; routeInfo.Encode(out buf); if (buf == null) { ADebug.LogError("WriteRoute Encode error!"); return(false); } return(gcloud_connector_writeRoute(ObjectId, data, dataLen, buf, buf.Length)); }
public RouteInfoBase CopyInstance() { RouteInfoBase instance = onCopyInstance(); if (instance != null) { instance.RouteType = this.RouteType; instance.AllowLost = this.AllowLost; } return(instance); }
public void SetRouteInfo(RouteInfoBase routeInfo) { if (routeInfo == null) { ADebug.LogError("SetRouteInfo: routeInfo is null"); } byte[] buf; routeInfo.Encode(out buf); if (buf == null) { ADebug.LogError("SetRouteInfo: routeInfo Encode error"); } else { gcloud_connector_setRouteInfo(ObjectId, buf, buf.Length); } }