RequiresAttribute
namespace Griff.Scenes;
public sealed class RequiresAttribute : AttributeSays a component only works with another one on the same entity, e.g. [Requires(typeof(Body))]. A base type such as Collider accepts any kind of it. The editor’s catalog shows requirements and adds what’s missing.
Properties
Section titled “Properties”public string? Note { get; init; }A few words on how it’s used, shown with the requirement, e.g. “usually a trigger”.
public Type Type { get; }Unless
Section titled “Unless”public string? Unless { get; init; }The name of a true-or-false property of the component that, while true, means it doesn’t need it after all: a dialogue that starts by itself as the scene starts needs no collider to be touched.