Scripting API
Scripting API
PackagePath
Class in Abyss.Core, from Abyss.Core.
How a path names a file of a package's: its id, ://, and its path under the package's own assets — acme.physics://models/rock.glb — or, for a shader, under its own shaders. A path with no id is the game's own.
public static class PackagePathMethods
IsId
public static bool IsId(string? id)Whether id is a package's id: two or more words joined by dots — a publisher's, then the package's own, acme.physics — each of lowercase letters, digits and -, starting with a letter. The engine refuses any other.
Parameters
id
Split
public static (string? Package, string Inside) Split(string path)The package a path names a file of, and the path in it; a null package for one of the game's own.
Parameters
path
Join
public static string Join(string? package, string rest)The path rest in the package package, or the game's own for none.
Parameters
packagerest
ShaderNamed
public static string ShaderNamed(string shader)What a shader is named by beside the assets, from its path in its shaders folder: shaders/glow.wesl for the game's glow.wesl, acme.physics://shaders/noise.wesl for a package's acme.physics://noise.wesl — as a material file and a pack name it.
Parameters
shader
ShaderIn
public static string? ShaderIn(string name)The path in its shaders folder of the shader name names beside the assets — the other way from PackagePath.ShaderNamed — or null where it names no file of a shaders folder.
Parameters
name
Constants
Separator
public const string Separator = "://"What comes between a package's id and the path in it.
