I need to use a fuzzy logic function that I’ve made in MATLAB in my UNITY3D project. Can anyone help me please?
I see two options:
[Complicated] Export your Matlab Code as an DLL and use P/Invoke see this:
With the latest Matlab Version it seem to be possible to compile a .Net assembly which could be used within Unity (as long it is compiled to .net version 2.0 or 3.5) See the matlab example: https://de.mathworks.com/help/compiler_sdk/ml_code/create-a-net-component-from-matlab-code.html
[Less Complicated] Wrap your Matlab model within a process hosting a network socket and communicate over a UDP Connection, Unity sends input parameters to your matlab process and the matlab process sends outputs to Unity.