Teilen Sie Ihre Erfahrunge und Wünsche mit uns und anderen Usern!

Support 2 months ago

Can you turn  in the OPCUA interface  the DebugMode to true and send us the content of the console log?

Under review

OPCUA Interface - Error in activating session

Ernesto 3 months ago in OPCUA4Unity updated by jonas bernecker 4 days ago 17

Dear all,

I'm having problems to connect to a remote OPC UA server using the OPCUA Interface Component.

I followed the "Connection troubleshouting" guidelines provided in "/game4automation/Documentation/opcua.html".

Configuring the OPC Server with "No security certificates and passwords" I could connect OPC Watch with the server (see Image):

However, when I tried connecting through the Unity OPCUA Interface:

I get the following error message:

OPCUA Interface - Error in activating session [BadUnknownResponse]
UnityEngine.Debug:LogError (object)
game4automation.OPCUA_Interface:Connect () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/OPCUA_Interface.cs:179)
game4automation.OPCUA_Interface:EditorImportNodes () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/OPCUA_Interface.cs:246)
game4automation.OPCUAInterfaceEditor:OnInspectorGUI () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/private/Editor/OPCUAInterfaceEditor.cs:20)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

As it can be seen in the last image, I'm using Unity 2021.3.2f1 Editor with Game4Automation Digital Twin Professional 2020.

Any idea of what I'm missing?

Thank you in advanced.

Support 1 week ago

Hi Erenesto,

I am sending you an email with a new code for OPCUA_Interface.cs. Please replace yours with this new code and I hope connection will work.

Changes will be included in upcoming 2021 release.


Robodk version with game4automation professional or game4automation OPC UA

efrensilveyra 1 year ago in OPCUA4Unity updated by Support 1 year ago 1

Which version of robodk is compatible with game4automation opc ua or game4automation professional. I ask, because I want to communicate robodk 4.0 with game4automation professional.


When will Unity 2019 be supported?

Stan 2 years ago in OPCUA4Unity updated by Support 2 years ago 5


I was wondering when will OPC UA for Unity 2019 will be supported?

With kind regards,

Stan (Developer at Siemens)

Support 2 years ago

Hi, we have no tutorial about that.Even if Unity 2019 is not officially supported yet, you should be able to get it running. What is your problem. What kind of error messages do you have?


Problems in OPCUA4Unity Output

Janik Tian 2 months ago in OPCUA4Unity updated by Support 2 months ago 4

Servus, I'm using OPAUA Interface for my first Program, but there are some problems with communication when i write int and float format variables in my PLCs.  In Figure 3 and 4 I try to write INT values to "robotArmSuccess" but in OPC Server the corresponding values are not changed. Then I read Demo of OPCUA and modify my Program with the function WriteNodeValue(NodeId, value) , it did not work in PLC Server, according to figure 1 and 2 . Could you please give me some Guidance for this situation?  

Figure 1

Figure 2

Figure 3

Figure 4


Driver_Simple script does not accept OPC UA variable nodes

Ernesto 3 months ago in OPCUA4Unity updated 1 month ago 17

Dear developers,

I was trying to connect a custom Game4Automation Scene to a PLC through OPCUA Interface.

I followed the instructions from this tutorial:

The OPCUAInterface is updating the nodes correctly:

However, when I tried to link a bool variable node from the OPCUAInterface to the Driver_Simple interface dragging it and droping it into the forward variable, it wasn't accepted (the forbiden symbol appeared).

If I use the PLC signal component I'm able to link the component without problems.

I'm using Unity 2021.3.2f1 Editor and the game4automation-Professional-2019.13 package (OPCUAInterface is not working in the latest version of G4A, see https://forum.game4automation.com/en/communities/1/topics/376-opcua-interface-error-in-activating-session).

Any idea of what am I doing wrong?

Thank you in advance!

Support 1 month ago

Hi Ernesto,

I am able to connect and to import the signals (even if I am not able to connect to the PLC because I don't have same setup).

Don't know where the problem is. Just for beeing sure I will send you again the latest code of the interface via mail. Please also check in Kepserver if you enabled anonymous login.


I can connect through OPCWATCH but when I try through G4A it doesn't work

Juliano Cortes 3 months ago in OPCUA4Unity updated 3 months ago 1
See the connection via OPCwatch

When I try to import the nodes into UNITY see the errors. And I already tried ANONYMOUS SECURITUY POLICY 0.1 AND 2.

Under review

OPCUA problems - doesnt Import any In-/Outputs

AndreS2 3 months ago in OPCUA4Unity updated by Support 3 months ago 5

Hey there,

first of all - the example Project provided with the Unified Automation OPCUA Server is working fine. 

Im using the latest Release of G4A which is 2020.16-beta-1123 and Unity Version 2020.3.19

The PLC is created in TIA Portal v17 which sends it to PLCSimAdvanced v4.0.

(Yes(!) i know i could use the PLCSimAdvanced Interface, but for now i have to stick to the OPCUA Interface)

This is what OPC Watch looks like when connected to my PLC which has an OPCUA Server:

You can see the Inputs and Outputs. 

When trying to import these Nodes into Unity with the G4A Framework im getting

In the "PLCOutputBool.cs", when changing from


The import finishes with no more errors.

But now looking into Unitys Hierarchy, no In-/Outputs where generated.(No Dropdown available at the Input & Ouput Gameobject)

Even then whole "PLC_1" Node is missing in Unity.

Support 3 months ago


can you share your PLCSIM-Advanced project (PLCSIMAdvanced 3.0)? Can be a simlified one with just the inputs and outputs.



OPCUA with 2020.15 Doesn't Import Arrays

Neil 3 months ago in OPCUA4Unity updated by Support 3 months ago 2

Hello. I have setup an OPCUA Client without issue on several versions of Unity (2019.4.18f1, 2020.3.25f1) with game4automation 2020.13. 

I now seem to have an issue Importing array nodes after an update to game4automation 2020.15. 

The nodes import, but the arrays are only a single gameobject without a list of value, instead of a hierarchy array of game objects that it does with 2020.13. 

Is this a known issue, or does it work differently with arrays now? Possibly because of the OPCUA change in 2020.14?

Support 3 months ago

Yes, arrays are not supported currently. We will add this in one of the next releases. If you need it at this moment you should go back to the old version.


OPCUA4Unity can't connect to opcua server with username and password

penjami rantakangas 4 months ago in OPCUA4Unity updated by Support 3 months ago 5

Anonymous connection works fine, but when using a username and password, the console doesn't show any errors in creating the connection, but I am not able to read or write to nodes. Also the server doesn't acknowledge the connection. Even when using application certificates the connection doesn't work properly. Using OPC Watch or UaExpert I can easily connect to the server with the username and password.

Support 3 months ago

Unity is connecting successfully but afterwards no nodes are available when the connection is done with a username and password. Are there any special security settings on the nodes itself in the server which could prevent the reading when loggin in with a user?