I just write my first plugin for Hurtworld. All works fine untill reloading this plugin. Compiler throw Error:
This lines are:Code:[Oxide] 02:02 [Error] Lengthofnickname plugin failed to compile! [Oxide] 02:02 [Error] Lengthofnickname.cs(53,27): error CS0012: The type `UnityEngine.EventSystems.IEventSystemHandler' is defined in an assembly that is not referenced. Consider adding a reference to assembly `UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Any ideas what can I do with this?Code:49 if (currentSession.Name.Length >= intmaxnamelength) 50 { 51 Puts(lang.GetMessage("Kick_Playr_For_Long_Nickname_ServerLog", this), currentSession.SteamId.ToString()); 52 Singleton<ConsoleManager>.Instance.ExecuteCommand("kick " + currentSession.SteamId + " " + lang.GetMessage("Kick_Playr_For_Long_Nickname_Ingame", this)); 53 return false; 54 }
Solved Error with my plugin (missing UnityEngine.UI reference)
Discussion in 'Hurtworld Development' started by PadL, Jul 1, 2016.
-
Wulf Community Admin
You need to reference mentioned in the error: UnityEngine.UI.
So at the top of your file, use // Reference: UnityEngine.UI -
Lol, I don't know this trick it's work now, thanks
-
@Wulf
if I bother you, is there a way to reload plugin itself?
For example, I use command for changing value in config-file and must reload it for take effect with /reload <plugin name>, but I want reloading plugin automatically. Is it possible?
I tried this, but console only throw: Unknown command: 'oxide.reload'
Code:Singleton<ConsoleManager>.Instance.ExecuteCommand("oxide.reload Lengthofnickname");
-
Wulf Community Admin
-
yea, true enough LoadDefaultConfig(); thanks again.
Last edited by a moderator: Jul 1, 2016