Error creating connector in Unity3D

3 posts / 0 new
Last post
Offline
Last seen: 4 years 5 months ago
Joined: 11/24/2019
Posts: 11
Error creating connector in Unity3D

Hello to everyone,

I am trying to establish a connection between Unity and DDS using C# Connector. For this, I followed the steps below in order:

1-)  I cloned the repository and compiled the API as stated in the documentation.

2-) RTI.Connext.Connector.dll was imported into Unity (Assets/Plugins folder) and  C:\rticonnextdds-connector-cs\rticonnextdds-connector\lib\ added to environment PATH.

I have done the steps correctly but I get this error:

Cannot create connector: System.Runtime.InteropServices.SEHException (0x80004005): Error creating connector at RTI.Connext.Connector.Interface.Connector..ctor (System.String configName, System.String configFile) [0x00026] in C:\rticonnextdds-connector-cs\src\Connector\Interface\Connector.cs:29 at RTI.Connext.Connector.Connector..ctor (System.String configName, System.String configFile) [0x00044] in C:\rticonnextdds-connector-cs\src\Connector\Connector.cs:39

public class MotionControl : MonoBehaviour {

string configPath = "/Scenes/USER_QOS_PROFILES.xml";

    string configName = "MyParticipantLibrary::SubscriptionParticipant";

  void Start()
 {
    try
     {
        Connector connector = new Connector(configName, configPath);
         RTI.Connext.Connector.Input reader = connector.GetInput(readerName);

    }
    catch (Exception e)
    {
      Debug.LogError($"Cannot create connector: {e}");
      return;
    }

}

What could be the cause of this error?
AttachmentSize
File My XML Configuration File3.38 KB
Offline
Last seen: 2 months 1 day ago
Joined: 04/02/2013
Posts: 196

You need to add `C:\rticonnextdds-connector-cs\rticonnextdds-connector\lib\x64Win64VS2013` to the PATH

Offline
Last seen: 4 years 5 months ago
Joined: 11/24/2019
Posts: 11

I am already added C:\rticonnextdds-connector-cs\rticonnextdds-connector\lib\x64Win64VS2013to the PATH. But I still get the error.