Get RAPTOR

RaptorCredits

Registry of bundled third-party components and their licences.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Settings → Legal → Credits lists one row per credit, with its title, component, licence and a View licence action. This class's static constructor registers RAPTOR's credits first. Module and project credits follow in registration order.

A credit's id matches its row in the package's notices data (notices.json). Rows in the same notices section share one credit. The licence path is resolved when the row needs it. If that file is missing, the package's NoticesFileName is used. If both are missing, the row shows Missing.

Register from an [InitializeOnLoad] static constructor on the main thread. The first credit registered with an id is kept. A path callback that throws is logged and does not affect other credits.

public static class RaptorCredits

Fields

DataFontId

public const string DataFontId;

Id of RAPTOR's data typeface credit (a row of the package's notices data).

MeshCoreId

public const string MeshCoreId;

Id of the credit titled Mesh tools: the mesh tools library (a row of the package's notices data).

NoticesFileName

public const string NoticesFileName;

The package's plain-text notices file, written at the package root by the exporter.

NumberFontId

public const string NumberFontId;

Id of the Suite's number typeface credit (a row of the package's notices data).

SboxId

public const string SboxId;

Id of the credit titled Mesh core: the upstream of the hotspot mapping (a row of the package's notices data).

StarterId

public const string StarterId;

Id of the starter textures' credit. Registered only when the starter folder exists.

WordFontId

public const string WordFontId;

Id of the Suite's word typeface credit (a row of the package's notices data).

Properties

All

public static IReadOnlyList<RaptorCredit> All { get; }

Gets every credit: RAPTOR's first, then the rest in registration order.

Count

public static int Count { get; }

Gets the number of registered credits.

NoticesPath

public static string NoticesPath { get; }

Gets the path of the package's notices file under RaptorPaths.Root.

Methods

Describe

public static string Describe(RaptorCredit credit)

Returns the row's description in the form "component, licence words licence" (e.g. "Roboto Mono, OFL licence").

ParameterTypeDescription
creditRaptorCreditThe credit.

Returns: The description.

Find

public static RaptorCredit Find(string id)

Returns the credit with this id, or null.

ParameterTypeDescription
idstringThe credit's id.

Returns: The credit or null.

IsRegistered

public static bool IsRegistered(string id)

Whether a credit with this id is registered.

ParameterTypeDescription
idstringThe credit's id.

Returns: True when registered.

LicenceWords

public static string LicenceWords(string spdx)

Returns the display words for an SPDX expression: "ISC", "MIT", "Apache 2.0", "OFL", "CC0", "ISC and MIT". A LicenseRef- id returns its name in lower case ("unknown").

ParameterTypeDescription
spdxstringAn SPDX licence id or expression.

Returns: The words.

Open

public static void Open(string path)

Opens a licence or notices file in the editor. A package path reveals the file on disk.

ParameterTypeDescription
pathstringA project path (Assets/... or Packages/...).

Register

public static bool Register(RaptorCredit credit)

Adds a credit after those already registered. Returns false when a credit with this id is already registered.

ParameterTypeDescription
creditRaptorCreditThe credit to add.

Returns: True when the credit was added.

Call from an [InitializeOnLoad] static constructor on the main thread.

ViewPath

public static string ViewPath(RaptorCredit credit)

Returns the project path that View licence opens: the credit's licence file if it exists, otherwise the package's notices file if it exists, otherwise null.

ParameterTypeDescription
creditRaptorCreditThe credit.

Returns: A project path or null.

  • RaptorCredit: One bundled third-party component and its licence.
  • RaptorPaths: Resolves RAPTOR's install and data folders.