Please FIX: PUN 1.28 Creating PunSceneSettings fails

Options
Hi,
while having PUN 1.28 in subfolder "Assets/3rdParty/Photon Unity Networking"
creating of PunSceneSettings fails with error:
Parent directory must exist before creating asset at Assets/Photon Unity Networking/Editor/PhotonNetwork/PunSceneSettingsFile.asset.

See PunSceneSettings.SceneSettingsFilePath

Please fix it, thanks & regards.

Comments

  • Until this get fixed by Exitgames, here is what I did in my own project:

    Basically, the issue is that PUN doesn't support moving the Unity package folder from the Assets root. If you look at line 43 in the file named PunSceneSettings.cs found in /Photon Unity Networking/Editor/PhotonNetwork/, you'll read the following:
    public static readonly string SceneSettingsFilePath = "Assets/Photon Unity Networking/Editor/PhotonNetwork/PunSceneSettingsFile.asset";
    
    The path to where PUN saves or updates the PunSceneSettings asset file is hardcoded.

    You can quickly and dirty fix it by simply adding your custom path there; in your case, it'd be something like:
    public static readonly string SceneSettingsFilePath = "Assets/3rdParty/Photon Unity Networking/Editor/PhotonNetwork/PunSceneSettingsFile.asset";
    

    The best would be to use a relative path.
  • Tobias
    Options
    Ow, that's actually an oversight on my side. We use that path as default to create settings assets and obviously I didn't check if the path exists.

    Sorry for the trouble. This gets a fix asap.
  • tutibueno
    Options
    The version 1.28.2 also has some issues: Assets/Photon-Realtime-Unity3D-Sdk_v4-0-0-4/demo-particle-unity/Assets/Photon/LoadbalancingApi/Extensions.cs(19,25): error CS0101: The namespace `ExitGames.Client.Photon.LoadBalancing' already contains a definition for `Extensions'
  • Tobias
    Options
    tutibueno:
    It seems like you are mixing PUN with the Photon Unity SDK. This can't work, sorry.
    You don't need the LoadBalancing API when you use PUN and vice versus. The APIs offer approximately the same Photon features but PUN adds some Unity-usual sugar-coating on top.

    The PunSceneSettings file should not be found no matter where you copied PUN to. PUN 1.28.3 is now in the Asset Store.