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

Method in [Utility](/api/csharp/yarn.compiler/yarn.compiler.utility.md)

## 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.)

```csharp
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

| Name                                                      | Description                                                                                            |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `string` sourceFileName                                   | The name of the file in which the node is defined, or `null` if not available.                         |
| `Yarn.Compiler.YarnSpinnerParser.NodeContext` nodeContext | The parsed node's context.                                                                             |
| `string` sourceTitle                                      | On return, contains the title of the node, as it appears in the source code.                           |
| `string` uniqueTitle                                      | On return, contains the unique title of the node, as stored in the output program.                     |
| `string` subtitle                                         | The sub-title of the node, if present. This value is always `null` if the node is not in a node group. |
| `string` nodeGroupName                                    | The 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.trygetnodetitle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
