Compiling two custom network manager scripts into one

Hello, I am rather new to C# programming and have been trying unsuccessfully for nearly two days to combine two scripts into one.

I bought an asset that allows for multiplayer implementation using SteamVR for the HTC Vive. This includes a custom network manager that works pretty well. Secondly, I found a package called VoiceChat with its own network manager that takes care of the audio side of things.

Both of these packages work perfectly alone. My problem is that Unity will only allow one network manager at a time, so I my strategy was to combine the two scripts.

Okay, so this is going to sound like I’m being a jerk, so I apologize, but a couple of things:
1- Being new to C# (or any scripting language) and trying to do networking (especially Unity!) = nothing but frustration and headaches.

Unity networking code is horrible to begin with, and trying to combine two different systems created by two different people is going to be even worse. You are going to basically have to rewrite everything from the ground up.

2- You are posting code that is for sale on the asset store. These assets are protected, and as such, what you are doing is illegal. You need to edit your post and either remove it, or at most, post some snippets that are pertinent to one of the errors or something. I’ll be notifying the owners of this software of this post. I have bought these packages myself and immediately recognized the code.

No one is going to rewrite these scripts for you because of both of the above points: It would take a lot of work and it would be illegal to post the results.

But to at least give you a hint at an answer, your first error that says “VoiceChatUi’ could not be found…” Means just that: the script is looking for a function or method called VoiceChatUi. You’ve got scripts that are referencing other scripts and you need to redirect all that, and as you’ve already experienced, that can become a huge pain. Unfortunately, in order for you to do what you want effectively, you’re going to have to understand what’s going on in those scripts and then write your own that gives you the features you want, which is why I bought them myself: I can’t implement them directly in the game, but I wanted to see how they were doing this so that I can add similar functionality to the scripts I’ve already written.

But all that being said, it can be done. As you stated, there can be only one network manager in the scene. Both of those sets of scripts are referencing “The” network manager, which is just a Unity component. They aren’t creating a custom network manager, they are just overriding some of the existing network manager’s functionality, so what you need to do is find the parts of those scripts that are sending instructions to the network manager and add those to your custom combined script, which means you’ll first have to understand exactly how the manager works.

Not the reply you were hoping for, I’m sure, but does that make sense?