Please do yourself a favor and play it safe here. First make a NEW project/Backup ALL invector scripts to test this out first since this hasn't even reached offical 1.0 release!
I wanted to add multiplayer to the invector templates but unfortunately there are not really any working examples of this on the forums. So I took it upon myself to make something. This was written with specifically the shooter template but can be easily adopted to all of them.
This is still a work in progress, I will be posting updates as they come. Hope this helps someone!
---- Photon PUN ----
Current Version: 0.7.9
Setup instructions are found on my github main page.
I am actually working on an editor script to do all of this for you. Also I have since updated this script to also sync the players rotation and position since the unity component "NetworkTransform" seems to have some issues with that.
Once I get approval to post that editor script from the invector team I will do that here.
Download the unity package and import that into unity. That should add a new menu item "Invector/Multiplayer/Make Player Multiplayer Compatible". Put your player prefab into that input and select the button, bam! Your done. Your player movements will now be synced across the network.
I am currently working on a few things related to the NetworkAnimator falling sort of actually syncing all animations across the network. I will be working on my own solution for this. Once I come up with something I like I will post and update here.
NOTE: I also realize I left a few debugging lines in my code as well as an un-used variable. Sorry about that. This is still a work in progress.
I would love to be able to just extend the script but the real issue is timing. There is no get method for animator triggers so really I can only trigger something by calling the SetTrigger method on NetworkAnimators.
So for example, what I will call "punch", is triggered in the vMeleeInput script like animator.SetTrigger("punch"). To send that trigger across the network I also have to add "GetComponent<NetworkAnimator>().SetTrigger("punch")". However, since there isn't a get method for triggers I have no idea how I would possibly get the timing right from simply extending the script. The only way I can think of is to create some form of a watcher script to see when a function is called. I have no idea how I would do that though to be honest.
If there is something that can actually do that I would love to hear about it. I'm doing my best to not touch any invector scripts here to make this completely an optional addon that can be easily added or removed.
Excellent! In the meantime I have added an editor script that will apply the needed lines to the invector script for you. It is safe enough that I can be run multiple times and will not add the same line twice.
You can find it under Invector/Multiplayer/Add Multiplayer To Invector Scripts
I will definitely try this out i been working on trying to get this working for a few days now but you have it working so thats save of a headache i'll try and post any information or new things i find out,Much appreciated here thanks!