BorrowedTorch.Editor
1.1.3
Prefix Reserved
dotnet add package BorrowedTorch.Editor --version 1.1.3
NuGet\Install-Package BorrowedTorch.Editor -Version 1.1.3
<PackageReference Include="BorrowedTorch.Editor" Version="1.1.3" />
<PackageVersion Include="BorrowedTorch.Editor" Version="1.1.3" />
<PackageReference Include="BorrowedTorch.Editor" />
paket add BorrowedTorch.Editor --version 1.1.3
#r "nuget: BorrowedTorch.Editor, 1.1.3"
#:package BorrowedTorch.Editor@1.1.3
#addin nuget:?package=BorrowedTorch.Editor&version=1.1.3
#tool nuget:?package=BorrowedTorch.Editor&version=1.1.3
BorrowedTorch.Editor
The editor SDK of Kindling, Borrowed Torch's game engine: what a game's editor code builds against. Its features add to the Kindling editor - views of the game's components in the inspector, panels, tools, menu commands and switches, kinds of surface-graph node - and its editor halves add to the engine inside the editor: viewport modes, overlays, values carried with the inspector's snapshots. The editor's own features register through the same SDK.
A game's editor code is a class library of its own beside the game's code, Code\Editor\<Game>.Editor.csproj. The
editor loads it with each build of the game and lets go of it with that build; the player never loads it.
using System.Windows.Media;
using BorrowedTorch.Editor.Features;
using BorrowedTorch.Editor.Inspectors;
public sealed class MyGameEditorFeature : IEditorFeature
{
public string EngineFeatureId => MyGameFeature.FeatureId;
public void Register(EditorFeatureBuilder builder)
{
builder.Inspectors.Add<SpinComponent, SpinView>(new ComponentDisplay("Spin", "🌀", Brushes.Orange),
editor => new SpinView(editor),
(view, spin, snapshot) => view.Show(spin, snapshot));
builder.Panels.Add("Spinners", editor => new SpinnersPanel(editor));
builder.Menus.Command("Game/Stop all spinners", editor => { /* ... */ });
builder.SurfaceNodes.Add(SpinUvNode.Definition);
}
}
Reference this package and BorrowedTorch.Engine at the version of the editor you run, with
ExcludeAssets="runtime": the editor brings both itself, and refuses editor code built against a newer SDK than its
own. The editor's File > New project (Game with code) and File > New game code write such a project for you;
so does dotnet new kindling-game (BorrowedTorch.Templates).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows10.0.19041 is compatible. |
-
net10.0-windows10.0.19041
- BorrowedTorch.Engine (>= 1.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.