0
Beantwortet

Compile errors on MQTT interface

MarkH vor 11 Monaten in General Questions aktualisiert von Ahmo vor 4 Tagen 10

I wanted to do a fresh install of all the components:

- Unity Hub 3.9.1

- Unity 2022.3.49f1

- Realvirtual-Professional-2022.18

Up to this point everything is working fine.

I copy these folders into the assets directory

Image 1218

After adding REALVIRTUAL_BESTHTTP3 to the scripting define symbols I get compile errors:

Image 1220

After adding REALVIRTUAL_BESTMQTT3 to the scripting define symbols I get additional compile errors:

Image 1221

What did I do wrong and how can I fix it?

Wird überprüft

What version of BestHTTP are you using?  I am wondering why you copied the BestHTTP into your Assets Directory - you just need to reference it via the package manger?

I obtained the Best MQTT Bundle with a download link from realvirtual, because realvirtual purchased a license
for me on the Unity Asset Store. I expect that I am using V3 because the link is from 2024.
With those files I was not able to reference it via the package manager, I only have the 3 directories and no unity package file.

Ah ok. I would need the full project for checking what is going wrong in your setup.

Please upload to https://realvirtual.io/send

Please check that the TwinCATHMI Asembly Definitions are like that - or, if you don't need, delete fully TwinCATHMIin your project.

Image 1224


Please also try to close Unity, delete the Library folder out of the project and restart the project. Based on this it works on my machine. 

I still have the compile errors and I traced it to:

Image 1225

I have to add the assembly definition references, but those are not know within the environment. com.tivadar.best.http and com.tivadar.best.mqtt are copied in the assets folder.

I found the problem. My besthttp files are absent, the zip file only contained folders.

Hi,

I have a similar problem. After I purchased 'The Ultimate Best Bundle', Unity can't compile.

My project contains only the realvirtual and MQTTInterface

Best HTTP V3, Best MQTT V3 and Best WebSockets V3.
These are imported using the Unity Package Manager.
I also checked Package directory, and all the scripts are present.

Error comes from TwinCATHMIInterface.cs  for some reason it cannot find the  Best.WebSockets


Image 1358

Image 1359

Image 1360

Image 1361

Image 1362





Hey Ahmo,

did you check the assembly definitions Realvirtual.interfaces.mqtt and Realvirtual.interfaces.TwinCATHMI for any missing references ?

Please also try to delete the Library folder of your project and reopen the project to see if the error persists.

The problem isn't the library or the project. The issue is that your realvirtual.interfaces.TwinCATHMI is missing the com.Tivadar.Best.WebSockets reference. This should probably be added in the next update or added to the realvirtual documentation because the com.Tivadar.Best.HTTP reference exists, but WebSockets is missing.

This is confusing because I'm using the MQTT interface and not TwinCATHM.
But anyway, I'm glad the problem is resolved!


Image 1364