Desperately trying to get module to work on client. #4327
-
The module I have attached has been working on U3DS with Rocket.Unturned installed just fine, but when running it on the client it does not execute the initialize function within Breakdown.Module.Nexus. Nexus inherits the IModuleNexus interface. All of the assemblies listed within the .module file have the role of 'Both_Optional'. I named it Breakdown because I knew it would probably lead to a mental breakdown at some point 🤣. My other module (JDE2) works fine on the client and has a similar setup when it comes to the .module file and what libraries are used. The only major difference for this module is the naming and the fact that it is now using .NET Standard 2.1. Some further information that might be helpful is that it wasn't working on the server either until I removed the netstandard library from the module. I copy-pasted the same setup to the client and it did not work. I also tried adding the netstandard library back to the client but that did not fix anything. The UITools library/module by BlazingFlame (aka Daniel) does load, but not my own module. vv - Breakdown.Module - vv |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The Nexus class I mentioned. Just to show what is intended to happen. I do not receive the 'Did it work?' message in logs when loading the module on the client. I am running the client without BattlEye. namespace Breakdown.Module
{
public class Nexus : IModuleNexus
{
/*
* WELCOME TO THE NEXUS FILE
* This is the origin point of Breakdown.Module, here all other classes are loaded.
*/
public void initialize()
{
UnturnedLog.info("Did it work?");
NetReflectionTool.AssignSearch(new Assembly[] { typeof(Nexus).Assembly });
NetReflectionTool.Apply();
if (Dedicator.isDedicated)
{
Level.onLevelLoaded += Loaded;
}
}
private void Loaded(int level)
{
PlayerLife.onPlayerLifeUpdated += UpdateLife;
}
private void UpdateLife(Player player)
{
TestManager.ServerTestNet(player.channel.owner.transportConnection, "Yo");
}
public void shutdown()
{
}
}
} |
Beta Was this translation helpful? Give feedback.
-
Resolved the issue, for those who come across this issue later, you need to have a specific copy of netstandard. In this case, from |
Beta Was this translation helpful? Give feedback.
Resolved the issue, for those who come across this issue later, you need to have a specific copy of netstandard. In this case, from
C:\Program Files\Unity\Hub\Editor\2021.3.29f1\Editor\Data\MonoBleedingEdge\lib\mono\4.5\Facades
. As for the dedicated server being able to run the module just fine, I did find out that I had a copy of netstandard.dll in the main U3DS folder that could have been loaded by the game somehow.