Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Official [MPPM] Multiplayer Play Mode Experimental Release Now Available

Discussion in 'Multiplayer Tools' started by CreativeChris, Dec 12, 2022.

  1. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    452
    Hi everyone

    A real pleasure to announce that Multiplayer Play Mode v0.1.0 is now available as an experimental package.

    Multiplayer Play Mode (MPPM) enables you to test multiplayer functionality without leaving the Unity Editor. You can simulate up to four Players (the Main Editor Player plus three Virtual Players) simultaneously on the same development device while using the same source assets on disk. You can leverage MPPM to create multiplayer development workflows that reduce the time it takes to build a project, run it locally, and test the server-client relationship.

    Requirements:
    • Unity Engine: 2023.1.a22 or above
    • Install the Unity Engine version here: https://unity.com/releases/editor/alpha
    • Install the package by name `com.unity.multiplayer.playmode` (version 0.1.0 or later)
    Known Issues:
    • Player windows cannot be reopened if they are closed during Play Mode
    • Virtual Players can remain in Play Mode after the Main Editor has exited in certain circumstances, such as if script changes are made during Play Mode and the “Stop Playing and Recompile” option is active.
    • Entering Play Mode with multiple scenes open is not currently supported
    • Virtual Players lose some Game View settings, such as Aspect Ratio, when exiting and entering Play Mode
    • Opening a Virtual Player with unresolved script updater issues will cause an API Update prompt to appear
    • Scripts will not be reloaded correctly in Virtual Players with “Enter Play Mode” settings set with “Reload Domain” disabled
    • In some cases, an error may appear in Virtual Player windows indicating that assets were imported when they were not supposed to be
    • Non-prefab assets like Scriptable Objects are not synced to Virtual Players unless you save your scene or invoke the Save Project command
    • Authentication with UGS will not work without manually overriding configuration values at runtime
    • Documentation is live: https://docs-multiplayer.unity3d.com//tools/current/mppm
    Feedback:

    Please open new threads on the Multiplayer Netcode for GameObjects subforum. Make it clear in the title that you are referencing MPPM. Alternatively, please use the #multiplayer-tools channel on the Multiplayer Discord Server: https://discord.gg/unity-multiplayer-network.

    Thanks on behalf of the Multiplayer Tools Team,
    Chris
     
    Last edited: Dec 13, 2022
  2. Walter_Hulsebos

    Walter_Hulsebos

    Joined:
    Aug 27, 2015
    Posts:
    21
    Awesome! This is one of the biggest game-changers for Multiplayer game development in Unity! It used to be very cumbersome to do any rapid testing.
     
    mgear likes this.
  3. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    3
    Good News indeed!
     
  4. joan_stark

    joan_stark

    Joined:
    Jul 24, 2018
    Posts:
    33
    Thanks! By any chance will this be ported to 2022.2-3 versions?
     
  5. m0guz

    m0guz

    Joined:
    Mar 4, 2015
    Posts:
    30
    Better late than never.

    Any chance this will be backported to at least 2022.x?
     
    Walter_Hulsebos and stonstad like this.
  6. MylesLambert

    MylesLambert

    Joined:
    Dec 31, 2012
    Posts:
    59
    Last edited: Dec 12, 2022
  7. JohannRw

    JohannRw

    Unity Technologies

    Joined:
    Jan 26, 2022
    Posts:
    5
    The package is experimental and might be not stable.
    For this reason, it does not appear in the package manager by default.
    If not done yet, could try to enable "enable Pre-Release packages" in the project settings ?
    upload_2022-12-12_10-26-25.png
     
    MylesLambert likes this.
  8. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    452
    Unfortunately not at this time. The engineering team made changes to the engine which were needed to enable this workflow.
     
    CameronBondeSAE and m0guz like this.
  9. joan_stark

    joan_stark

    Joined:
    Jul 24, 2018
    Posts:
    33
    So if we are developing in 2022.X we will be forced to update without chance of sticking to 2022 lts...
     
  10. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    286
    @joan_stark @m0guz if you're on 2022 or lower, you can still use ParrelSync. Even if it's not an official Unity product it works pretty well (I use it in production projects) and covers MPPM's use case
     
  11. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    @RikuTheFuffs-U How does one go about reading the tags you set in MultiPlayer Play Mode? (for Main Editor, Player 2, etc) .. How can you figure out which one to do StartHost() on and StartClient() on?

    Nevermind found it. Unity.Multiplayer.Playmode.CurrentPlayer.Tag :)
     
    Last edited: Dec 14, 2022
    RikuTheFuffs-U likes this.
  12. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    @RikuTheFuffs-U Do you have to deactivate / reactivate a player every time you make a code change? Mine seems to only update when I do that. It's pretty slow doing that, am I missing something?
     
  13. Sarono

    Sarono

    Joined:
    Apr 12, 2018
    Posts:
    4
    ParrelSync open clone editor too slow, user experience is not good.
     
    m0guz likes this.
  14. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    2,066
    ParrelSync cloned projects open the same speed as any other editor instance after the initial copy was made. However if you only have 8gb of memory then surely two unity editor instances will slow things down quite a bit.
     
    RikuTheFuffs likes this.
  15. msfredb7

    msfredb7

    Joined:
    Nov 1, 2012
    Posts:
    106
    On the documentation, there is this mention:
    "There’s no restriction on where you can keep these scripts that work with Player Tags, but you must attach the scripts to a NetworkObject (such as the Player)."

    1. The link to NetworkObject seems to be broken.
    2. Does that mean we need to use one of Unity's multiplayer package in order to use tags (Netcode for X)? For example, my project uses Photon Bolt.
     
  16. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    286
    We are pleased to announce a new release of Multiplayer Play Mode! ("MPPM")

    Version 0.1.1 Highlights:

    We have added support for additive scenes. This minor release also includes minor bug fixes, some of them were reported by users.

    Requirements:
    • Unity Engine: 2023.1.a22 or above (get it here)
    • Install the package by name com.unity.multiplayer.playmode (version 0.1.1 or later)
    Known Issues:
    • Player windows cannot be reopened if they are closed during Play Mode
    • Virtual Players can remain in Play Mode after the Main Editor has exited in certain circumstances, such as if script changes are made during Play Mode and the “Stop Playing and Recompile” option is active.
    • Virtual Players lose some Game View settings, such as Aspect Ratio, when exiting and entering Play Mode
    • Opening a Virtual Player with unresolved script updater issues will cause an API Update prompt to appear
    • Scripts will not be reloaded correctly in Virtual Players with “Enter Play Mode” settings set with “Reload Domain” disabled
    • In some cases, an error may appear in Virtual Player windows indicating that assets were imported when they were not supposed to be
    • Non-prefab assets like Scriptable Objects are not synced to Virtual Players unless you save your scene or invoke the Save Project command
    • Authentication with UGS will not work without manually overriding configuration values at runtime

    Documentation is live: https://docs-multiplayer.unity3d.com//tools/current/mppm

    Feedback:


    Please open new threads in this subforum.
    Alternatively, please use the #multiplayer-tools channel on the Multiplayer Discord Server.

    Thanks on behalf of the Multiplayer Tools Team,

    Paolo
     
    m0guz and CameronBondeSAE like this.