Custom objects (altered prefabs)

Options
I have a custom object that I alter the mesh on after I load the prefab. Unfortunately that means that the prefab does not stay the same as it was when it was loaded so its basically a different object. Is there anyway to transfer that type of data through Photon?

I thought about having a script attached to the prefab and maybe somehow I can send a message to the other players to alter the mesh locally. Sorry I am new to Photon so I'm approaching this blindly, so far the documentation I looked at makes it seem like Photon only sends data on objects that came from prefabs.

Comments

  • Dev
    Options
    I'm not sure if im understanding you correctly but You Could make a a second prefab (the altered mesh) and just instantiate that?
  • KingDruid
    Options
    Dev said:

    I'm not sure if im understanding you correctly but You Could make a a second prefab (the altered mesh) and just instantiate that?

    It would be a prefab that I change in game. For example, in the worker example you have that worker that spawns from the prefab, well I would be altering that mesh live in game to give him longer arms.

    I'm thinking I can have a script that is on the prefab that I can tell PUN to call on each user to alter their mesh, but I'm new to this so I'm not really sure.
  • vadim
    Options
    You can transfer any data through Photon. in this particular case you can synchronize arms length (1 float to synchronize) and modify mesh locally basing on given length. Or synchronize all changed vertices coordinates in case modification can't be expressed in simple values.