Opti track plugin- UE 5.1

Hi,

Has anyone managed to re-compile the Optitrack plugin for UE 5.1?

The optitrack plugin for UE 5.0 has two folder/plugins OptitrackLivelink and OptitrackNatnet.

I managed to re-compile Optitracklivelink successfully but when launching the UE5.1 editor I have an error: cannot locate Natnetlib.DLL

I assumed it needs OptitrackNatnet as well so tried to compile Natnet plugin but I get errors and build failed.

Anyone managed to recompile this plugin for UE 5.1?

Hi

Iā€™m not a 100% sure this will be functional. Had to gut 1 function override (was changed to final) and put in the closest equivalent.

Directions are in the readme.txt

Plugins do show up in 5.1 but let me know if they work as intended as I do not own any motion tracking hardware to test it.

Blueprints & modules seem to be in place. Let me know if it syncs up correctly.

Thanks for the help 3dRaven,

Here is what I did:
I copied the Optitrack folder in plugin, I started my project and the plugin shows. I tried to check them both but on restart I get the ā€œEngine module cannot be compiled at Runtime. Please build through your IDEā€.

So, I followed the following to recompile (My project was Blueprint based only) How to Convert a Blueprint Only Project to a C++ Project (using Windows)
It builds fine if the Optitrack plugins are disabled, but once I enable then I get this message upon restart:
ā€œThe following modules are missing or built with a different engine version:
OptitrackLiveLink
OptitrackNetnat
Engine modules cannot be compiled at runtime. Please build through your IDEā€

I tried to build the all project again following this (How to Convert a Blueprint Only Project to a C++ Project (using Windows)) again from 7.

But as soon as I hit BUILD I get the error message:

1>Expecting to find a type to be declared in a module rules named ā€˜OptitrackLiveLinkā€™ in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the ā€˜ModuleRulesā€™ type defined by Unreal Build Tool.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ā€œC:\UE_5.1\Engine\Build\BatchFiles\Build.bat Studio_BaseTemplateEditor Win64 Development -Project=ā€œC:\Users\User\Desktop\Studio_BaseTemplate\Studio_BaseTemplate.uprojectā€ -WaitMutex -FromMsBuildā€ exited with code 6.
1>Done building project ā€œStudio_BaseTemplate.vcxprojā€ ā€“ FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I can see that you were able to enable both plugin and run the project fine on your end. What I am doing wrong?

It could be a bad cache file from after the conversion.
I would suggest deleting the following folders:

  • .vs
  • Binaries
  • DerivedDataCache
  • Intermediate
  • Saved

And then re-generating the project (right cliick the icon with the blue unreal logo and pick generate visual studio project)

I specifically changed the engine version to 5.1 in OptitrackLiveLink.uplugin and OptitrackNatnet.uplugin so the error should not show up.

Iā€™m not sure if the UE5Rules error isnā€™t something specific to visual studio 2019 and how it interprets the compile headers. Iā€™ve switched to 2022 for some time and rarely go back to it.

Iā€™ll try a recompile on 2019 and Iā€™ll check if it throws the same error
edit: seems unreal automatically compiles it for 2022 in my case. Cannot downgrade the generate process :frowning:

If I hit Re-Build instead of Build in VS2019. I still get the message below but not the error and the build succeed.
1>Expecting to find a type to be declared in a module rules named ā€˜OptitrackLiveLinkā€™ in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the ā€˜ModuleRulesā€™ type defined by Unreal Build Tool.

However when I try to launch the project I still get:
ā€œThe following modules are missing or built with a different engine version:
OptitrackLiveLink
OptitrackNetnat
Engine modules cannot be compiled at runtime. Please build through your IDEā€

I am trying to install VS2022 and see if it changes anything.

If the problem persists I can pack you the whole project and you can test it out with 2022 later on.
Itā€™s very basic and you can check if it compiles & runs with no errors on your end.

Same behavior with VS2022.

Would be great if you could send that whole project.

By the way, I do not have a ā€œbianriesā€ folder in my projectā€¦?
Did I miss something? I do not have anything to recompile on the engine side right?

If you are compiling the game from visual studio it is responsible for building the binaries folder (it contains binary files that are the outcome of the project compiling). I will upload a full version of the project soon.

Link to full project

Unpack => right click unreal project file => Generate Visual Studio project" => run project file in visual studio => compile project and wait for the editor to run.

Also make sure you have the correct source selected (pick switch unreal engines and point engine built from 5.1 source)

Plugins should be loaded on startup.

In visual Studio, what should be the solution config? Development Editor, development, Shipping?

Edit:
Ok It compiled without issue and was able to start the project.
I did have a warning at startup saying that the map couldnā€™t be loaded because it was done with a more recent version of the engineā€¦
I am using 5.1 preview1. Are you running 5.1 preview 2?
Could this be the issue?

I grabbed the latest version from Github. Didnā€™t see if it was preview 2 though (Iā€™m guessing it would be stated in the branch)

After reinstalling UE 5.1 and VS I finally got the project to compile. And the plugin seems to work fine. :grinning:
Thanks a lot for your support and sending the different files!

1 Like