1. So I am currently having issues creating an Oxide Extension for my Rust UI. I could not find any documentation on creating an extension so I have been using the Rust extension and RustIO but for some reason I still can not manage to get mine to work.

    Can I perhaps ask for one of the developers to help me out on this issue? Some general direction of where I should look or giving me a crash course on creating an extension.

    I am really trying to aim at creating the best possible UI system for rust so that other Plugin Developers can use this extension. This extension gives you the full flexibility on creating a UI in the most simplest way possible. If this kicks off, I'm hoping that it could become part of the main Rust extension.

    Not only does this extension simplify the UI but it also checks to make sure no UI elements are out of the screen view.

    [EDIT] One of the main future features to add is a time based system so you can send a UI to a selected player or players and after a time period it will be destroyed from the client. It's a good way to create some notification system. But of course I first have to get this extension to work before I can implement that kind of a feature.
     
  2. [EDIT] Okay so I have the extension loading in properly but now I have one issue... the plugin is not allowing my using statement "using Oxide.Ext.RustUI"

    Code:
    using Oxide.Core;
    using Oxide.Core.Extensions;namespace Oxide.Ext.RustUI
    {
        public class RustUIExtension : Extension
        {
            public RustUIExtension(ExtensionManager manager)
                : base(manager)
            {
            }        public override string Name { get { return "RustUI"; } }        public override VersionNumber Version { get { return new VersionNumber(1, 0, OxideMod.Version.Patch); } }        public override string Author { get { return "Zuen Studio"; } }        public override void Load()
            {
                Manager.RegisterLibrary("RustUI", new Libraries.RustUI());
            }        public override void LoadPluginWatchers(string plugindir)
            {  
            }        public override void OnModLoad()
            {
            }
        }
    }
    
    Logs
    Code:
    3:40 AM [Warning] Replaced obsolete game extension using directive 'Oxide.Ext.RustUI' in plugin 'RustUITest'
    3:40 AM [Error] RustUITest plugin failed to compile!
    3:40 AM [Error] RustUITest.cs(13,17): error CS0246: The type or namespace name `WindowUI' could not be found. Are you missing an assembly reference?
     
    Last edited by a moderator: Jun 13, 2015
  3. So you have both the magic reference and the using directive at the top of your plugin?
    //Reference: Oxide.Ext.RustUI
    using Oxide.Ext.RustUI
     
  4. I did not have the Magic reference but did add it with no change.

    Oxide Logs
    Code:
    11:16 AM [Info] Loading Oxide core v2.0.1047...
    11:16 AM [Info] Loading extensions...
    11:16 AM [Info] Loaded extension CSharp v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension JavaScript v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension Lua v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension MySql v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension Python v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension RustUI v1.0.1047 by Zuen Studio
    11:16 AM [Info] Loaded extension SQLite v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension Unity v1.0.1047 by Oxide Team
    11:16 AM [Info] Loaded extension Rust v1.0.1047 by Oxide Team
    11:16 AM [Info] Loading plugins...
    11:16 AM [Info] Loaded plugin Unity Core v1.0.0 by Oxide Team
    11:16 AM [Info] Loaded plugin Rust Core v1.0.0 by Oxide Team
    11:16 AM [Warning] Ignored obsolete game extension reference 'Oxide.Ext.RustUI' in plugin 'RustUITest'
    11:16 AM [Warning] Replaced obsolete game extension using directive 'Oxide.Ext.RustUI' in plugin 'RustUITest'
    11:16 AM [Error] RustUITest plugin failed to compile!
    11:16 AM [Error] RustUITest.cs(14,17): error CS0246: The type or namespace name `WindowUI' could not be found. Are you missing an assembly reference?
    

    Oxide Compile Log
    Code:
    [SERVER] Started as service
    [SERVER] Running as service
    [SERVER] Got Message: Ready
    [SERVER] Got Message: Compile
    [SERVER] Console: RustUITest.cs(5,18): error CS0234: The type or namespace name `RustUI' does not exist in the namespace `Oxide.Game'. Are you missing an assembly reference?
    RustUITest.cs(12,26): error CS0246: The type or namespace name `Ext' could not be found. Are you missing an assembly reference?
    RustUITest.cs(14,17): error CS0246: The type or namespace name `WindowUI' could not be found. Are you missing an assembly reference?
    

    Plugin Code
    Code:
    //Reference: Oxide.Ext.RustUI
    using System;using Oxide.Core;
    using Oxide.Ext.RustUI;namespace Oxide.Plugins
    {
        [Info("Rust UI Test", "ZuenTheMan", "0.0.1")]
        class RustUITest : RustPlugin
        {
            private readonly Ext.RustUI.Libraries.RustUI _rustUI = Interface.GetMod().GetLibrary<Ext.RustUI.Libraries.RustUI>();        private WindowUI testWindow;        [ChatCommand("uic")]
            void cmdUIClose(BasePlayer player, string command, string[] args)
            {
                testWindow.Destroy(player);
            }        [ChatCommand("ui")]
            void cmdUIOpen(BasePlayer player, string command, string[] args)
            {
                try
                {
                    testWindow.SendToPlayer(player);
                }
                catch (Exception ex)
                {
                    SendReply(player, ex.Message);
                }
            }        void Loaded()
            {
                testWindow = _rustUI.CreateNewWindow("TestingUI", true, new Image(new Grid(GridType.Small), new ColorData("0.1", "0.1", "0.1", "0.5")));
                testWindow.NewControl("button_01", new Button(new Grid(new PositionData(1, 1, 1, 1), GridType.Small), new ColorData("0", "0", "0", "0.5"), new ButtonData("cmd", "TestingUI"), new TextData("Click Me")));
            }
        }
    }
     
  5. Make sure IsGameExtension returns false.
     
  6. Still not working... and I thought you said this would be easy to follow... MySQL and SQLite doesn't even have any "IsGameExtension" reference in the code.
     
  7. If you pm'd me your extension code I could take a look.