Skip to content

OutputFormatAttribute

namespace Griff.Scenes;
public sealed class OutputFormatAttribute : FieldEditorAttribute

Marks a string property as text that shows an output when another property names one, with {0} for the output and {1} what it’s out of, each with a format after a colon if it says (“Gold: {0}”, “{0} / {1}”, “{0:0.0} m/s”): a Text’s Value. While the output is set the Inspector offers what to put in and shows how it reads now.

public string Output { get; }

The property of the component naming the output it shows.

public override string Describe()
public string? Preview(Component component, string? template)

How component’s text reads with template as its value, with what its output gives now; null when it names no output, or the output can’t be found.