McBrideMusings
McBrideMusings

Reputation: 29

Unity Perforce Integration Host Error

I'm a sole developer using Unity and my own Perforce server, and 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

p4v version P4V/MACOSX1011X86_64/2017.3/1601999

MacOS version 10.13.2

Upvotes: 0

Views: 552

Answers (1)

Samwise
Samwise

Reputation: 71454

If it's possible to run a p4 info command via the Unity plugin, that'll tell you what it thinks the hostname is. (Most Perforce clients call this "Server information" or something like that -- I couldn't find enough documentation on the p4 Unity plugin to figure out if it exposes that concept.) That would assist with debugging.

Assuming that the Unity environment is somehow preventing the p4 client library from finding the right hostname, you might be able to fix it by setting P4HOST:

p4 set P4HOST=PierceMac.local

That should override whatever the client is auto-detecting.

Upvotes: 1

Related Questions