Skip to content
QiuHanWen edited this page Mar 24, 2023 · 2 revisions

You can write you own code just like other unity project.

Access to Manager Instance

You can access different kind of manager instance via AC_ManagerHolder:

public static class AC_ManagerHolder
{
    //——System——
    public static IAC_SystemCursorManager SystemCursorManager { get; internal set; }
    public static IAC_SystemInputManager SystemInputManager { get; internal set; }
    public static IAC_SystemAudioManager SystemAudioManager { get; internal set; }
    public static IAC_SystemLogManager SystemLogManager { get; internal set; }

    //——Setting——
    public static IAC_CommonSettingManager CommonSettingManager { get; internal set; }

    //——Cursor——
    public static IAC_SceneManager SceneManager { get; internal set; }
    public static IAC_EnvironmentManager EnvironmentManager { get; internal set; }
    public static IAC_TransformManager TransformManager { get; internal set; }
    public static IAC_StateManager StateManager { get; internal set; }
}

Interfaces

You can receive callback by inheric from the following interfaces:

  • IAC_Manager_ModInitHandler: Called when mod scene inited/deinited.
  • IAC_CursorState_ChangedHandler: Called when cursor state changed.
  • IAC_CommonSetting_XXXHandler: Called when cursor setting changed.
  • IAC_SystemAudio_XXXDataChangedHandler: Called when system audio data changed.
  • IAC_SystemCursor_AppearanceChangedHandler: Called when system cursor's appeanance changed (eg: activation state/cursor type).
  • IAC_SystemInput_MouseXXXHandler: Called when system mouse input event occured.
  • IAC_SystemWindow_ChangedHandler: Called when active system display's state changed(eg: resolution changed or display changed).

Restrictions

For security reasons, some scripts are not allow to included in mods:

Assembly

  • UnityEditor
  • Mono.Cecil

Namespace

  • System.IO.*
  • UnityEngine.SceneManagement.*

Type

  • System.AppDomain
  • System.Threading.Process
  • UnityEngine.Input
  • Threeyes.IO.FileIO
  • Threeyes.External.ExternalResources
  • PathTool

Member

  • UnityEngine.Application.Quit

Note

  • Custom script inherit from ScriptableObject is not supported, any references to these objects will resolve to null after built.
  • You can check out my AliveCursor_ModUploader sample project for better understanding.
Clone this wiki locally