DialogueMarker2D

These are used in your character scenes to help mark a character's position relative to the viewport. You can also use them as an origin point for a speech balloon style dialogue balloon.

[!NOTE] When adding nodes from the "Add Child Node" button Godot will attach the GDScript version of the node which is fine for most cases. If you specifically need the C# version then you'll have to attach the script manually.

Properties

character_name

var character_name: String = ""
[Export] public string CharacterName = "";

The name of the character this marker points to.

Methods

all

static func all() -> Array[DialogueMarker2D]
public static Array<DialogueMarker2D> All()

Get all DialogueMarker2D nodes in the current scene tree.

find_for_character

static func find_for_character(target_character_name: String) -> DialogueMarker2D
public static DialogueMarker2D FindForCharacter(string targetCharacterName)

Find a marker in the current scene tree that has a given character name.

get_position_in_viewport

func get_position_in_viewport() -> Vector2
public Vector2 GetPositionInViewport()

Get the marker's position relative to the viewport.