Unity3d as OPC Client

I am trying to Connect to a OPC Server using Unity as client.

Has any experience with this?

My problem is that all the .NET OPC client Toolkits or SDK´s out there is either using .NET 4.0, running unmanaged code or using COM/DCOM.

We ended up building a bridge (using python) that runs as a separate application and communicates with unity via osc or tcp

If anybody has found a workable solution, paid or not, for reading (and writing) from an OPC server directly from (and to) Unity I would very much like to hear it!

So not through some separate application or tunnelling mechanism.

We also ended up to write a TCP bridge for several reason:

  • the OPC server we were trying to access to was running on a VM. Communication to an OPC server through network is a real pain as you have to modify your windows security settings, as far as I remember
  • Unity is stick to .NET 2.0 (and even a .NET 2.0 subset according your target) and most OPC library are using further .NET versions. Except if you want to rewrite an OPC library from scratch without these .NET requirements, you are quite fucked up there.

So we have developped a simple TCP bridge between Unity and the OPC server. We used the very easy to use OPCDANET library from Advosol (sorry for the ad but the question refers to an eventual paid solution).

Hope it helps

Hi @feranti !

I’m doing the same thing. Trying to acces to OPC server ( running on VM) From Unity3D.
Can you please explain me how did you developped your TCP bridge ?

Many Thanks,
Haithem

I tried using the code from this source:

Still no luck trying to connect to the OPC UA server.

Is there any update? I am quite new, so I do not understand many of things. How this TCP bridge works?