So I have a Unity project that builds and runs great on Windows and I was trying to import it and build it for macOS but I am having issues opening Pulse on my Macbook Pro.
When I try to open my project it gives me the errors that Pulse and other related packages don’t exist in the namespace indicating that it is not compiling correctly. I have also tried pulling the original “unity” repository from GitLab and that project will not open in Unity at all with an error saying that the project is not valid.
Any advice would be appreciated thanks!
Since Pulse is C++, we have to provide native builds for every os/platform we support.
Does your Macbook Pro have one of them new fangled ARM based processors or a an intel?
As I do not have an ARM based mac, you might need to build the Pulse library for it to work on that particular platform combination. If it is Intel, I can help get you the right build.
My Macbook is one of the Intel ones but I would like to be able to build it for both platforms if possible.
Does this just mean that the plugins in the repository need to be rebuilt for Pulse to work on OSX?
Or is there more to it?
For runtime problems, that is what I would look at first, that the native dylib is of the proper build.
The asset store version should be the right build for intel macOS though…
So if you are getting an error opening the project in unity (not opening the built executable, since you cannot build an executable), that seems to be the mac unity not utilizing/seeing/reading the .NET Pulse dll provided in the managed folder of the Pulse asset. I don’t have Unity installed on my mac, but I have seen it open on MacOS Unity instances before… maybe you need to add the macos platform tag the PulseCSharp.dll on your project
I had a look at the settings you suggested and my PulseCSharp.dll does not have platform settings for Linux or macOS.
Also, it doesn’t even let me open the original Unity project from GitLab so I wasn’t able to try with that either.
Have you tried installing mono?
I doubled check the .net core sdk and mono installs and also tried using both vscode and regular vs.
Still the same errors though. Can’t think of any leads on why it isn’t able to compile/open either.
What kind of player settings are you using?
This is what I have got at the moment.
Are you able to change the backend to il2cpp?
Yep, It changes and recompiles with the same errors. I checked the PulseCSharp file in Plugins/Managed and it still does not have platform settings for macOS
Maybe try making a copy of that dll and putting it in your application tree
Maybe unity will provide you with different options if it has to create a new meta file
No luck with that either. Tried with all combinations of il2cpp/mono and framework types.
Might be some configuration broken with this Mac that I need to investigate.
I tried on a different Macbook and it seems to open with the same issue.
VSCode’s Omnisharp also indicates that Pulse and it’s corresponding packages are missing in the project.
In the .csproj files which TargetFrameworkVersion is being used?
What does the managed Google.Protobuf.dll look like in Unity for you?
This is what the inspector shows for the Google.Protobuf.dll in the Managed directory.
Similar to the PulseCSharp.dll it does not have macOS platform settings and has a Native type instead of Managed.
Here are various protobuf .net dlls of various frameworks… maybe one will be recognized by unity
All of the replacement Google.Protobuf have the missing macOS platform settings and now show as Managed targeting .net 4.x.
The PulseCSharp still does not compile though with any of them.
Is there a certain Protobuf file that I should use in combination with a certain Player settings compiler selection?
Or it might just be my Managed dlls are corrupted?
They work fine for me on windows
I would try building a simple managed dll with msvc and see how unity interprets it
It seems that mac unity won’t recognize managed dlls from visual studio, so I would try to make one that it can… if I could, and if it does, go from there
what version of unity are you using?