Utility.TryGetNodeTitle(string?,YarnSpinnerParser.NodeContext,string?,string?,string?,string?)

Method in Utility

Summary

Gets the title for a node as defined in the source code, along with its unique title (which may be different to the source title.)

public static bool TryGetNodeTitle(string? sourceFileName, YarnSpinnerParser.NodeContext nodeContext, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out string? sourceTitle, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out string? uniqueTitle, out string? subtitle, out string? nodeGroupName)

Parameters

NameDescription
string sourceFileNameThe name of the file in which the node is defined, or null if not available.
Yarn.Compiler.YarnSpinnerParser.NodeContext nodeContextThe parsed node’s context.
string sourceTitleOn return, contains the title of the node, as it appears in the source code.
string uniqueTitleOn return, contains the unique title of the node, as stored in the output program.
string subtitleThe sub-title of the node, if present. This value is always null if the node is not in a node group.
string nodeGroupNameThe name of the node group the node is a member of, if any.

Returns

true if the sourceTitle and uniqueTitle could be determined; false otherwise.