Skip to content

API Features

3cxc edited this page Sep 12, 2026 · 3 revisions

NativePluginKit.Features

Host-backed feature modules. These classes provide a convenient, strongly-typed façade over the raw function pointers in HostApiTable.

Namespace Types Description
NativePluginKit.Features.FMOD 1 Scene transition helpers.
NativePluginKit.Features.Logger 1 Logging helpers.

NativePluginKit.Features.FMOD

Type Description
Transition 提供场景切换功能,调用宿主 API 的 TransitionToScene 函数。

Transition

public class Transition

Provides scene-transition functionality by invoking the host's TransitionToScene function.

Methods

TransitionToScene(string scenePath, bool fadeOut)
public static void TransitionToScene(string scenePath, bool fadeOut)

请求宿主程序切换到指定场景。

Parameter Type Description
scenePath string 场景路径 (UTF-8)
fadeOut bool 是否使用淡出过渡效果,默认为 true

The scene path is passed as an unmanaged UTF-8 string. Memory is released immediately after the call.


NativePluginKit.Features.Logger

Type Description
Log 提供插件端日志输出功能,调用宿主 API 的 PrintLog 函数。

Log

public class Log

Provides plugin-side logging by invoking the host's PrintLog function.

Methods

PrintLog(string message)
public static void PrintLog(string message)

向宿主程序输出一条日志消息。

Parameter Type Description
message string 要输出的日志内容

The message is converted to an unmanaged UTF-8 string and passed to the host API. Memory is released immediately after the call.

Clone this wiki locally