This is an easy addon with automated scripts and help windows to quickly convert your game made with the invector templates to support multiplayer. Here is a list of what this package currently supports/does not support.
Price: $18 Asset Store Link: assetstore.unity.com/packages/tools/integration/invector-multiplayer-addon-159489
v3.5.7: * Melee Template Support * Automated testing suite * PreBuilt Main Menu UI w/ Music/Sounds * Lobby system - Join Game In Progress - Multi Room Support * Auto prefab conversion scripts * Auto scene conversion scripts * Auto player conversion scripts * Lobby camera system * Initial Spawn Point System * Network Manager * Sync player Positions/Rotations * Sync player animations * Sync Damage * Sync Weapons * Sync Bone positions * Sync item drops/pickups (Cross Unity Scenes as well) * Sync Unity Scenes/Photon Rooms (Scene Manager included for easy scene transitions) * Walkthrough videos * Over 7,000+ lines of code to help you along the way! * Voice Chat * Text Chat w/ profanity filtering * Prebuild ChatBox UI w/ animations * Cross Scene Transitions (Individually or as a whole room) * networked ragdoll * Respawn System * World Message Broadcast System * Player Lists
Not Currently Supported/Built: * FSM AI * Builder Add-on * Death Camera * Death by who/what screen * Kick/Ban support * Teleport To Player * Optional UIs for Co-Op, Free-For-All, and Teams * Team Based Chat, Room Chat, Individual Chat (Global only right now)
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!