Unity Perforce Integration Host Error

I’m having an issue using the built-in Perforce integration with Unity specifically on my Macbook Pro.
The built-in integration works flawlessly on my Windows 10 desktop, but on my Macbook Pro I get an error in Unity when I try to connect to my server.

Client 'MastersProject_Laptop' can only be used from host 'PierceMac.local'. 

PierceMac.local being the hostname of my computer and MastersProject_Laptop being the p4v workspace. The issue is, despite what Unity thinks, that IS the correct hostname. I checked using “hostname” in the terminal. Furthermore, if I change the workspace hostname in p4v, p4v throws the same error. This suggests that it an issue with Unity, but I can’t figure out what I’m doing wrong.

Unity version 2017.3.0f3

HI

Please can you give me some more background information to help answer your question.

  • Does it work if you leave the “host”
    field empty in the Unity Version
    Control settings?
  • Can you share the P4 workspace
    settings especially the “host” value?
  • Can you get p4v to connect correctly
    using the same “host” field that you type into the Unity Version Control settings?

There can be a behaviour on OSX to do with the hostname where it changes depending on what network you are connected to. You can disable this behaviour with:

sudo scutil --set HostName <whatever you want your hostname to be>