Plugin Classes/Game Classes Limitations

Calling methods from base class

System/Unity Classes limitations

Game use IL2CPP builds, so Classes/Methods/Constructors and etc. that game dont use will not be available in plugins.

If you need something, that not available in game, you can contact Game Developer on our Discord server or create ticket(better) to ask about implementing this.

Server/Client Communications

Item, Player Classes, Rooms and etc use three functions to communicate between connections:

  • SendToClient

  • SendToServer

  • SendToEveryone

Calling functions must be public, otherwise they will not be called. They can accept most of base value types, like int, float, string and etc, also Unity Vector3 and Quaternion.

SendToServer also pass Mirror.NetworkConnectionToClient as last parameter to function, but this is optionally and not require to be in server function.

Obtaining Player Classes, Items, Room Events

Plugin classes use proxies, so when trying to get class, check its type, otherwise you will get error of incorrect type. Example:

if(player.playerClass.GetType() == typeof(PlayerClassProxy))
{
    PlayerClassProxy proxy = player.playerClass as PlayerClassProxy;
    Debug.Log(proxy.GetName());
}
else
{
    Debug.Log(player.playerClass.GetName());
}

if(player.items[5].GetType() == typeof(ItemProxy))
{
    ItemProxy proxy = player.items[5] as ItemProxy;
    Debug.Log(proxy.GetName());
}
else
{
    Debug.Log(player.items[5].GetName());
}

Last updated