Replies: 1 comment
-
I would say it fails because cannot find the For Unity, I would recommend to configure discovery and transport programmatically, something like is done in the Unit Test project: RtpsDiscovery disc = new RtpsDiscovery(RTPS_DISCOVERY);
ParticipantService.Instance.AddDiscovery(disc);
ParticipantService.Instance.DefaultDiscovery = RTPS_DISCOVERY;
ParticipantService.Instance.SetRepoDomain(RTPS_DOMAIN, RTPS_DISCOVERY);
string guid = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
string configName = "openddsharp_rtps_interop_" + guid;
string instName = "internal_openddsharp_rtps_transport_" + guid;
TransportConfig config = TransportRegistry.Instance.CreateConfig(configName);
TransportInst inst = TransportRegistry.Instance.CreateInst(instName, "rtps_udp");
RtpsUdpInst rui = new RtpsUdpInst(inst);
config.Insert(rui);
TransportRegistry.Instance.BindConfig(configName, entity); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i'm running into troubles trying to create a participant in unity
I managed to get the domain participant factory via the
ParticipantService.Instance.GetDomainParticipantFactory()
method but when i used theDomainParticipantFactory.CreateParticipant()
method, it returned null.Note: the
DomainParticipantFactory.CreateParticipant()
method only returned null upon pressing the play button in the editor after the first time the play button was pressed.In the API documentation, I know that the reason why it returns null is because it has failed to create a participant, but what I want to know is why did it fail to create a participant... Any ideas or leads as to why is that happening and how do I fix it?
Beta Was this translation helpful? Give feedback.
All reactions