Search Unity

Third Party Photon InstantiateSceneObject

Discussion in 'Multiplayer' started by SteveJ, Sep 16, 2017.

  1. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    First off, I'm very new to Photon and MP coding in general, so I'm making this up as I go along.

    I'm hoping someone can give me some general advice on approach/design pattern.

    I have a scene in which I spawn players. Within the scene there are item managers that spawn items on start up using InstantiateSceneObject. All the players can see the items. All good.

    I use Easy Touch asset to making hooking up interaction events nice and simple. Example of an item in the screenshot.

    The problem is, the click, drag, etc events only fire right now for the master client, though there is ONE item in the scene that other players can also interact with (for some unknown reason), but let's just ignore that for a sec.

    I've seen a lot of examples (some included with PUN) of pickups that the player just runs into, firing an OnCollision, which then easily passes the player and their PhotonView, etc. In my case though, players will drag and drop the items they see into their inventory. Here's a video of how it works for the master client - http://www.stevejarman.com/temp/photon1.mp4

    Anyway, I'm rambling a bit, but I'm basically trying to get some hints on how to approach those OnSimpleTap, OnDragStart, OnDragEnd implementations, to make them "MP aware".

     
  2. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Anyone got any advice or tips on this one? I still haven't managed to get a working solution up and running.