/// <summary> /// All clients need to be initialized which creates an instance of an internal speckle client object, /// authenticates against the server and provides a manager object to receive inspector arguments from. /// </summary> /// <param name="manager">The manager instance that provides inspector values for this client.</param> /// <param name="url">The url of the speckle server to connect to.</param> /// <param name="apiToken">The authentication token of the user to connect as.</param> /// <returns>An async <c>Task</c> of the new operation.</returns> public override async Task InitializeClient(SpeckleUnityManager manager, string url, string apiToken) { if (streamRoot == null) { streamRoot = new GameObject().transform; streamRoot.name = "Default Stream Root: " + streamID; } this.manager = manager; client = new SpeckleApiClient(url.Trim(), true); client.BaseUrl = url.Trim(); RegisterClient(); await client.IntializeReceiver(streamID, Application.productName, "Unity", Guid.NewGuid().ToString(), apiToken); Debug.Log("Initialized stream: " + streamID); deserializedStreamObjects = new List <object> (); layerLookup = new Dictionary <Layer, Transform> (); speckleObjectLookup = new Dictionary <GameObject, SpeckleObject> (); numbers = new List <float> (); strings = new List <string> (); meshes = new List <Mesh> (); meshRenderers = new List <MeshRenderer> (); //after connected, call update global to get geometry await UpdateGlobal(); }
/// <summary> /// All clients need to be initialized which creates an instance of an internal speckle client object, /// authenticates against the server and provides a manager object to receive inspector arguments from. /// </summary> /// <param name="manager">The manager instance that provides inspector values for this client.</param> /// <param name="url">The url of the speckle server to connect to.</param> /// <param name="authToken">The authentication token of the user to connect as.</param> /// <returns>An async <c>Task</c> of the new operation.</returns> public abstract Task InitializeClient(SpeckleUnityManager manager, string url, string authToken);
/// <summary> /// /// </summary> /// <param name="controller"></param> /// <param name="url"></param> /// <param name="authToken"></param> /// <returns></returns> public override Task InitializeClient(SpeckleUnityManager controller, string url, string authToken) { throw new System.NotImplementedException(); }