EasyEcs
API reference

SingletonRef<T>

Handle to one world's singleton T. The SingletonRef<T> struct of EasyEcs, the C# ECS: its members, parameters and complexity.

public readonly struct SingletonRef<T> where T : struct, ISingletonComponent

Handle to one world's singleton T. The singleton's storage never moves, so the handle stays valid until the singleton is removed (a removed singleton is detached: writes no longer reach the world).

Properties

Value

public ref T Value { get; }

The singleton's value, by reference.

Edit on GitHub

Last updated on

How is this guide?

On this page