Начните вводить название — например, MoreHead, Sodium или PEAK

FieldInjector — иконка
Обложка BONELABМод для BONELAB

FieldInjector

от WNP78

A utility for other mods to inject monobehaviour fields into the IL2CPP domain.

  • Эпический
  • 91,1 тыс. скачиваний
  • Версия 2.1.1
  • Обновлён 24 февраля 2025
  • Не обновлялся больше года
  • Утилиты

О моде FieldInjector

FieldInjector — мод для BONELAB (Бонлаб) от автора WNP78. A utility for other mods to inject monobehaviour fields into the IL2CPP domain.

Его скачали 91,1 тыс. раз: это 17-е место среди модов BONELAB в нашем каталоге, редкость — «эпический» (топ-20% по скачиваниям). Мод давно не обновлялся — проверьте совместимость с текущей версией игры, актуальная версия — 2.1.1.

Это библиотека: сама по себе ничего не добавляет, но нужна другим модам.

Полное описание FieldInjector

Текст автора на языке оригинала

This mod is a utility for other mods to utilise MonoBehaviour field serialisation injection. Original mod for Boneworks now ported to Bonelab.

Instructions for players

  • To install the mod, just extract FieldInjector.dll into your Mods folder in the game install location.

Instructions for programmers

If you want to utilise custom MonoBehaviours with properly serialised fields from asset bundles, reference this mod as a dependency. Note: instead of using this mod directly, I might recommend using Maranara's "Cauldron" system for a more unified end-to-end experience and integration with the Unity editor, that uses this mod under the hood. The instructions below apply only if you want to roll your own systems and just use this to apply serialisation.

Writing a custom MonoBehaviour

This is fairly simple, and there is very little difference between a normal unity MonoBehaviour and this. There is only a small amount of boilerplate code to add:

using UnityEngine;

class MyScript : MonoBehaviour
{
    // all of your normal MonoBehaviour code can go here

#if !UNITY_EDITOR
    public TestMB(IntPtr ptr) : base(ptr) { }
#endif
}

the #if instruction means that this code should compile in both the Unity Editor and in a MelonLoader mod, so that you can keep your code unified and test in the editor with ease.

This tech is still not totally mature, so I recommend testing out whatever you're doing first before relying on it working. Here's what the mod should support.

  • primitive types like float, int, string, bool
  • structs that are defined by Unity or the game (ie, Vector3, Quaternion)
  • references to objects defined by the game or unity, e.g. GameObject or Transform
  • you might have success with references to mod classes, as long as those classes are injected before the class with the reference to them is injected. If this throws up issues remember you can always just have a serialised reference to the GameObject and then use GetComponent in Start.

Also supported as of 2.0 (should work):

  • custom structs (structs defined in mods)
  • classes with cyclic field references
  • injected enums

Injecting a custom MonoBehaviour

This is what this mod is used for, and it is very simple:

FieldInjector.SerialisationHandler.Inject();

in the OnApplicationStart method is all that is needed. Do not register the class in Il2Cpp with MelonLoader or UnhollowerBaseLib - this mod does that itself and it won't be able to inject the class with fields if it's already injected without fields. Makers of frameworks that load code should consider registering fields for loaded behaviours automatically.

Changelog

  • v1.0: Release
  • v1.1: Added support for enum fields, cleaned code/memory allocation and added FieldInjector.SerializeField attribute to force serialisation of a non-public field.
  • v2.0: Rewrite of serialisation handling to allow struct/enum injection.
  • v2.0.2: Fix bugs with injected enums as fields and arrays of non-blittable structs.
  • v2.0.3: Prevented non-serialized fields from being considered when mapping injection dependencies.
  • v2.0.301: Update thunderstore readme, no code change
  • v2.0.400 (aka 2.1.0 (?)): Update for Unity 2021.3.16 (Bonelab Patch 4/5)
  • v2.1.1: Fix bug causing crashes when certain injected classes were referenced in fields and no structs were injected.

Моды, которым нужен FieldInjector

8 в каталоге · показаны самые популярные

WideEye — иконка

WideEye

WideEye is a BONELAB mod that lets users customize spectator camera options, such as FOV and more.

Эпический42,5 тыс.Утилиты

Dynamic Bones P6 — иконка

Dynamic Bones P6

Use Dynamic Bones ingame for patch 6

Эпический30,1 тыс.Утилиты

FlatPlayerPlus — иконка

FlatPlayerPlus

A BONELAB mod that adds several quality-of-life features for FlatPlayer.

Редкий14,9 тыс.Утилиты

AvatarStatExtender — иконка

AvatarStatExtender

Set your avatar's stats and extra sounds from the SDK, and load them in game seamlessly. True stat customization.

Обычный8,3 тыс.Утилиты

VoidSpeaker — иконка

VoidSpeaker

A music player for BONELAB

Обычный6,3 тыс.Звук

Fusion Focused Modpack — иконка

Fusion Focused Modpack

A modpack that includes all publicly available Bonelab mods compatible with Bonelab Fusion, ensuring everyone has the same mods to play together.

Обычный6,2 тыс.

Как установить FieldInjector

Файл скачивается с официального сервера Thunderstore, без перезаливов и сторонних установщиков

Подробная инструкция для BONELAB
  1. Скачайте менеджер модов r2modman (или Gale) и выберите в нём игру BONELAB.
  2. Создайте профиль — так моды не смешаются с чистой версией игры.
  3. Найдите «FieldInjector» во вкладке Online и нажмите Download — MelonLoader и все зависимости подтянутся сами.
  4. Нажмите «Start modded» — игра запустится с модами.
  5. Чтобы сыграть без модов, запустите игру как обычно из Steam — r2modman не трогает чистую версию игры.
Вы автор мода? Поставьте ссылку на русское описание

Вставьте значок в описание на Thunderstore, в README или в Discord — русскоязычные игроки сразу попадут на страницу с переводом и инструкцией.

Описание на русском — Модка
Markdown[![Описание на русском — Модка](https://modka.app/badge.png)](https://modka.app/bonelab/wnp78-fieldinjector/)
HTML<a href="https://modka.app/bonelab/wnp78-fieldinjector/"><img src="https://modka.app/badge.png" alt="Описание на русском — Модка" height="44"></a>
Steam (BBCode)[url=https://modka.app/bonelab/wnp78-fieldinjector/]Описание на русском — Модка[/url]

Частые вопросы о FieldInjector

Как установить FieldInjector?

Скачайте менеджер модов r2modman (или Gale) и выберите в нём игру BONELAB. Создайте профиль — так моды не смешаются с чистой версией игры. Найдите «FieldInjector» во вкладке Online и нажмите Download — MelonLoader и все зависимости подтянутся сами. Нажмите «Start modded» — игра запустится с модами. Чтобы сыграть без модов, запустите игру как обычно из Steam — r2modman не трогает чистую версию игры.

Безопасен ли FieldInjector?

Файл скачивается с официального сервера Thunderstore, куда его загрузил WNP78. Мы не перезаливаем и не изменяем моды.

Когда FieldInjector обновлялся последний раз?

24 февраля 2025, актуальная версия — 2.1.1. Это больше года назад: перед установкой проверьте, работает ли мод на текущей версии игры.

Похожие моды

Все моды на BONELAB
ThunderstoreModAssistant — иконка

ThunderstoreModAssistant

Mod to assist in downloading code mods off Thunderstore in-game

Легендарный427,3 тыс.Утилиты

ModioModNetworker — иконка

ModioModNetworker

Mod.io subscription integration. (Auto Downloader, Auto Updater, Fusion Lobby Mod Sharing)

Легендарный178,1 тыс.Утилиты

AvatarStatsLoader — иконка

AvatarStatsLoader

Override default avatar stats with values specific to each avatar.

Легендарный109,5 тыс.Утилиты

FusionNetworkingPlus — иконка

FusionNetworkingPlus

An addon for Fusion which adds extra network layers! Currently adds RiptideNetworking.

Эпический91,9 тыс.Утилиты

RagdollView — иконка

RagdollView

See from the ragdoll's perspective when using other player ragdoll mods.

Эпический79,8 тыс.Утилиты

MagPerception — иконка

MagPerception

An ammo visualization mod that helps you see how many bullets exist in your magazines.

Эпический55,6 тыс.Утилиты