Editor P4CONFIG

I have encountered this problem too.

From my observation, the current path in Unreal is the engine directory (or base dir)

Inside Unreal you can check the current Path in Python

import os
current_path = os.getcwd()
print("Current working directory:", current_path)

LogPython: Current working directory: C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64

So your p4config.txt will never be taken into account by Unreal as your outside of your depot!

For the moment, I have made a Python script to change to current directory but I have to uncheck/check the “Use P4 Config” manually to take into account the p4config file.

The only way I know to disconnect/reconnect the source control is with the help C++.

I have tried to bypass this, by forcing the lauching path of Unreal from the project directory with a batch file, it’s not working.

For me it has to be done somewhere inside Unreal.