Scripting API

Scripting API

Res<T>

Struct in Abyss.Core, from Abyss.Core.

Read-only access to a resource's value, pointing at the native storage.

public readonly ref struct Res<T> where T : unmanaged

Remarks

A ref struct for the same reason chunks are: the pointer is valid only for the system run that produced it, and the compiler is the cheapest place to enforce that.

Type parameters

  • T: The resource's struct type.

Properties

Value

public ref readonly T Value { get; }

The resource's value. Reading goes straight to native memory; no copy is made.