So currently i'm trying to make an extension. And i can't use it. I don't understand what i am doing wrong.
Code:using Oxide.Core; using Oxide.Core.Extensions;namespace Oxide.Ext.MapUtils { public class MapUtilsExtension : Extension { public override string Name => "MapUtils"; public override string Author => "me"; public override VersionNumber Version => new VersionNumber(1, 0, 0); private Libraries.MapUtils map; public MapUtilsExtension(ExtensionManager manager) : base(manager) { } public override void Load() => Manager.RegisterLibrary("MapUtils", map = new Libraries.MapUtils()); } }My plugin:Code:using System; using System.IO;using Oxide.Core; using Oxide.Core.Libraries;namespace Oxide.Ext.MapUtils.Libraries { public class MapUtils : Library { // methods } }
And i get an error:Code:using Oxide.Core;namespace Oxide.Plugins { [Info("Something", "Something", "0.0.1", ResourceId = 000)] [Description("This is what the plugin does")] public class Something: RustPlugin { private Ext.MapUtils.Libraries.MapUtils map = Interface.GetMod().GetLibrary<Ext.MapUtils.Libraries.MapUtils>(); void OnServerInitialized() { map.SomeMethod(); } } }
What's wrong?Code:[Oxide] 17:55 [Error] Error while compiling Something.cs(10,15): error CS0234: The type or namespace name `MapUtils' does not exist in the namespace `Oxide.Ext'. Are you missing an assembly reference?
P.S. Yes i copied my extension dll to "Managed" folder. Extension loads fine "[Oxide] 18:46 [Info] Loaded extension MapUtils v1.0.0"
Making an extension
Discussion in 'Rust Development' started by deer_SWAG, Oct 11, 2016.
-
Any thoughts?
-
You can use the open-source extension by @Calytic as a starter guide. GitHub - Calytic/Oxide.Ext.Catalyst: Plugin & dependency management extension for the Oxide modding framework.
-
Wulf Community Admin
Technically all of Oxide is extensions, and open source.
GitHub - OxideMod/Oxide: Core mod and extensions for the Oxide mod framework.
