ZeroMix.PluginSDK 6.8.0

dotnet add package ZeroMix.PluginSDK --version 6.8.0
                    
NuGet\Install-Package ZeroMix.PluginSDK -Version 6.8.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroMix.PluginSDK" Version="6.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroMix.PluginSDK" Version="6.8.0" />
                    
Directory.Packages.props
<PackageReference Include="ZeroMix.PluginSDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZeroMix.PluginSDK --version 6.8.0
                    
#r "nuget: ZeroMix.PluginSDK, 6.8.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZeroMix.PluginSDK@6.8.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZeroMix.PluginSDK&version=6.8.0
                    
Install as a Cake Addin
#tool nuget:?package=ZeroMix.PluginSDK&version=6.8.0
                    
Install as a Cake Tool

ZeroMix.PluginSDK

NuGet License: MIT .NET

Universal plugin SDK untuk .NET — bisa dipakai untuk membuat plugin di ZeroMix maupun aplikasi .NET lain yang mengimplementasi IPluginHost.


⚠️ Penting: Kompatibilitas Aplikasi Host

SDK ini berbasis .NET 9 dan hanya kompatibel dengan aplikasi yang dibangun di atas .NET.

Aplikasi Kompatibel? Catatan
ZeroMix Native support, langsung jalan
Aplikasi WPF (.NET) Implementasi IPluginHost sendiri
Aplikasi WinForms (.NET) Implementasi IPluginHost sendiri
Aplikasi Console (.NET) Implementasi IPluginHost sendiri
OBS Studio OBS pakai C/C++ native, bukan .NET
Photoshop Plugin Photoshop pakai C++ / UXP (JS)
VS Code Extension VS Code pakai TypeScript/JS
Game Engine (Unity) ⚠️ Unity pakai .NET tapi sistem plugin berbeda

Singkatnya: SDK ini cocok untuk aplikasi desktop Windows yang dibangun dengan .NET/C#.


📦 Install

dotnet add package ZeroMix.PluginSDK

🚀 Cara Membuat Plugin untuk ZeroMix

Step 1 — Buat project baru

dotnet new classlib -n MyZeroMixPlugin -f net9.0-windows
cd MyZeroMixPlugin
dotnet add package ZeroMix.PluginSDK

Step 2 — Implementasi plugin

using ZeroMix.PluginSDK;

public class MyPlugin : IZeroMixPlugin
{
    public string Name        => "CPU Monitor Plugin";
    public string Version     => "1.0.0";
    public string Description => "Tampilkan CPU usage di status bar ZeroMix";

    private IPluginHost? _host;

    public void OnLoad(IPluginHost host)
    {
        _host = host;
        host.Log($"Plugin dimuat di {host.HostName} v{host.HostVersion}");

        // Akses system monitor (ZeroMix mendukung ini)
        var monitor = host.GetService<ISystemMonitor>();
        if (monitor != null)
        {
            double cpu = monitor.GetCpuUsage();
            double ram = monitor.GetRamUsage();
            host.Log($"CPU: {cpu}% | RAM: {ram}%");
        }

        // Tampilkan status
        var status = host.GetService<IStatusService>();
        status?.SetStatus("CPU Monitor Plugin aktif!");

        // Operasi UI — selalu pakai Dispatch
        host.Dispatch(() =>
        {
            // Contoh: buat window kustom
            var win = new System.Windows.Window
            {
                Title = "CPU Monitor",
                Width = 300,
                Height = 200
            };
            win.Show();
        });
    }

    public void OnUnload()
    {
        _host?.Log("Plugin dinonaktifkan.");
        _host = null;
    }
}

Step 3 — Build plugin

dotnet build -c Release

Step 4 — Deploy ke ZeroMix

Copy hasil build ke folder plugins ZeroMix:

C:\Program Files\ZeroMix\Tools\Plugins\MyZeroMixPlugin\
    MyZeroMixPlugin.dll
    MyZeroMixPlugin.deps.json

Step 5 — Aktifkan di ZeroMix

Buka ZeroMix → sidebar Plugins → plugin kamu muncul otomatis → klik Enable.


🔌 Cara Mengintegrasikan ke Aplikasi .NET Kamu (Jadi Host)

Kalau kamu punya aplikasi .NET sendiri dan ingin mendukung plugin dari SDK ini:

Step 1 — Install SDK di project kamu

dotnet add package ZeroMix.PluginSDK

Step 2 — Implementasi IPluginHost

using ZeroMix.PluginSDK;

// Contoh: aplikasi WPF sederhana sebagai host
public class MyAppHost : IPluginHost
{
    public string HostName    => "MyApp";
    public string HostVersion => "1.0.0";

    // Jalankan di UI thread (WPF)
    public void Dispatch(Action action) =>
        System.Windows.Application.Current.Dispatcher.Invoke(action);

    // Logging
    public void Log(string message) =>
        System.Diagnostics.Debug.WriteLine($"[Plugin] {message}");

    // Expose service yang kamu support
    public T? GetService<T>() where T : class
    {
        if (typeof(T) == typeof(IStatusService))   return new MyStatusService() as T;
        if (typeof(T) == typeof(ISystemMonitor))   return new MySystemMonitor() as T;
        if (typeof(T) == typeof(IStorageService))  return new MyStorageService() as T;
        return null;
    }
}

// Implementasi service status
public class MyStatusService : IStatusService
{
    public void SetStatus(string text) =>
        System.Diagnostics.Debug.WriteLine($"[Status] {text}");

    public void ShowNotification(string title, string message) =>
        System.Windows.MessageBox.Show(message, title);
}

Step 3 — Load dan jalankan plugin

var host   = new MyAppHost();
var plugin = new SomePlugin(); // plugin yang implement IZeroMixPlugin
plugin.OnLoad(host);

// Saat app tutup atau plugin di-disable:
plugin.OnUnload();

🌙 Lua Plugin (Khusus ZeroMix)

ZeroMix juga mendukung plugin berbasis Lua — tidak perlu compile, cukup buat file script.lua.

Struktur folder Lua plugin

Tools/Plugins/user.pub.NamaPlugin/
    script.lua
    config.json   (opsional)

Contoh script.lua

-- Dipanggil saat plugin diaktifkan
function OnLoad()
    CreateUI("My Lua Plugin", 400, 300)
    AddLabel("Halo dari Lua!")
    AddButton("Klik Aku", "OnButtonClick")
    Notify("Plugin", "Lua plugin aktif!")
end

-- Dipanggil setiap detik
function OnUpdate()
    local cpu = ZeroMix:GetCpuUsage()
    Log("CPU: " .. cpu .. "%")
end

-- Callback tombol
function OnButtonClick()
    Notify("Info", "Tombol diklik!")
end

Lua API yang tersedia

Fungsi Keterangan
CreateUI(title, w, h) Buat window plugin
AddLabel(text) Tambah teks
AddInput(id, placeholder) Tambah input field
AddButton(text, callback) Tambah tombol
GetInput(id) Ambil nilai input
Notify(title, msg) Tampilkan dialog
Log(msg) Tulis ke debug log
SaveConfig(key, json) Simpan data
LoadConfig(key) Baca data
ZeroMix:GetCpuUsage() CPU usage
ZeroMix:GetRamUsage() RAM usage

📋 API Reference (C#)

IZeroMixPlugin

Member Keterangan
Name Nama plugin
Version Versi (x.y.z)
Description Deskripsi singkat
OnLoad(host) Dipanggil saat aktif
OnUnload() Dipanggil saat nonaktif

IPluginHost

Member Keterangan
HostName Nama aplikasi host
HostVersion Versi host
Dispatch(action) Jalankan di UI thread
Log(message) Tulis log
GetService<T>() Ambil service opsional

Services via GetService<T>()

Interface Method Keterangan
ISystemMonitor GetCpuUsage() CPU 0–100
GetRamUsage() RAM 0–100
GetDiskUsage() Disk 0–100
IStatusService SetStatus(text) Status bar
ShowNotification(title, msg) Dialog notifikasi
IStorageService Save(key, json) Simpan data
Load(key) Baca data
PluginDirectory Path folder plugin


Maintained by ZeroMix Team | License: MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net9.0-windows7.0 is compatible.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.
  • net9.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.8.0 105 4/28/2026
6.6.1 106 4/26/2026
6.6.0 95 4/26/2026
6.5.0-NoExe 82 4/26/2026
6.3.0-NoExe 86 4/26/2026
5.9.0 115 4/17/2026
5.3.1 105 4/8/2026
5.2.6 106 4/7/2026
5.2.4 105 4/5/2026
1.0.1 111 4/4/2026