Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Custom package breaks in MPPM 0.6.0

Discussion in 'Multiplayer Tools' started by nickfourtimes, Nov 20, 2023.

  1. nickfourtimes

    nickfourtimes

    Joined:
    Oct 13, 2010
    Posts:
    219
    Hey there, we're trying out U2023.2.0 + MPPM 0.6.0, and I'm noticing some new errors.

    We've got a custom version of Cinemachine loaded via the Packages/ directory; basically, it's the same as the base CM package, with a few small extensions. However, if we use these latest versions of Unity + MPPM and enter Play mode, any open virtual players throw a bunch of errors related to CM, and the game logic is busted.

    I tried reverting to the base version of CM, and MPPM worked flawlessly (I was able to run the editor window as a host, and the virtual player as a connected client; and vice-versa). I then tried copying our small extensions over to the CM version that was in Library/PackageCache – i.e., using a slightly modified (and non-persistent) version of the default package – and again, MPPM performed as expected.

    It seems like it's only when we've got Cinemachine installed as a custom package that the scripts break down in the virtual player(s). Wondering if this is a known issue, or the type of thing for which I should submit a bug report.
     
  2. simon-lemay-unity

    simon-lemay-unity

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    416
    Yeah we have a bug here with custom versions of packages directly in the Packages directory. Unity considers them as implicit dependencies and the clones don't catch on to that. As a workaround until we address it properly, it should be possible to just list the dependency explicitly in the manifest:
    Code (JavaScript):
    1. "dependencies": {
    2.   ...
    3.   "com.unity.cinemachine": "file:./com.unity.cinemachine@X.Y.Z"
    4. }
    We have code in MPPM to handle file dependencies like that (and rewrite the path to point at the appropriate folder in the main project). It's just the implicit dependencies that we don't handle properly yet.
     
    nickfourtimes likes this.
  3. nickfourtimes

    nickfourtimes

    Joined:
    Oct 13, 2010
    Posts:
    219
    That did the trick, thanks for the quick solution!