Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Sharing a variable in mutliplayer

Discussion in 'Multiplayer' started by Jason Harron, Feb 19, 2015.

  1. Jason Harron

    Jason Harron

    Joined:
    Feb 19, 2015
    Posts:
    10
    Hi everybody,

    I'm currently trying to create a step-sequencer in Unity where multiple people can log-in at once and collaborate making music/noise.

    The current build of my project: http://tinyurl.com/collaborativesoundscape

    My current challenge is that I am trying to figure out how to make it so if I click on a block in my scene (these blocks are not instantiated... so in my scene the first block may have ObjectID 1, and on the client is might be ObjectID150) that any block on the server or client with the tag "Block1-1" will toggle. At the moment it doesn't matter if I use the Unity's built-in networking or PUN since it seems the code is basically the same for my prototyping purposes. So far it seems like an RPC might be the way to send the variable to system, and using an Allbuffered anybody who logs in could see the current setup.

    Any advice is appreciated :)
     
  2. Jason Harron

    Jason Harron

    Joined:
    Feb 19, 2015
    Posts:
    10