Scripting API
Scripting API
ProjectSettingsAttribute
Class in Abyss.Core, from Abyss.Core.
Marks a struct as a project's settings, declared in a game's or a package's code: a resource every world has from the start, which its systems read with Res<T>; a page of Project Settings by ProjectSettingsAttribute.Title, its fields edited with the Inspector's rows; and settings/<file>.json, which a built game's pack carries.
public sealed class ProjectSettingsAttribute : AttributeRemarks
What it starts as is what its fields' initializers say, where the project's file says nothing of a field; a field the file names that the struct no longer has is passed over, and one renamed is found by FormerlySerializedAsAttribute.
A game may change them as it plays, with ResMut<T>, for that run: the file is the project's, written only by Project Settings, and Play and Stop in the editor put the project's values back.
Constructors
ProjectSettingsAttribute
public ProjectSettingsAttribute(string title)Settings shown as the page title, kept in the file the title makes.
Parameters
title: The page's name in Project Settings:Physics 2D.
Properties
Title
public string Title { get; }The page's name in Project Settings.
File
public string? File { get; init; }The file they are kept in, without .json, under settings: by default the title in small letters, a hyphen between its words — physics-2d. Said to keep a file as the title changes.
