Search Unity

Custom Network Manager Script requires internal UNET Method access

Discussion in 'Scripting' started by Grigorjan, Nov 27, 2015.

  1. Grigorjan

    Grigorjan

    Joined:
    Nov 27, 2015
    Posts:
    1
    I have copied the code of the UNET's Networkmanager and NetworkmanagerHUD to create two custom scripts that lie around in my Assets/Scripts folder.

    They work just as expected when putting the cause of my errors into comments but I am reluctant to delete/change things that I don't understand yet. As such there were about three method calls that were shown in Visual Studio as not being existing members of the class and in Unity it was explained they could not be called from my script due to their protection level.

    I checked the source code of these methods' classes and they are internal. I assume I can get my script to work like the actual Networkmanager if I can figure out a way to gain access by being in the same assembly. Is there some way to make this work without actually modifying the UNET DLL?

    cheers,
    David