Click or drag to resize

Navigation2DNavpolyAdd Method

Adds a NavigationPolygon. Returns an ID for use with NavpolyRemove(Int32) or NavpolySetTransform(Int32, Transform2D). If given, a Transform2D is applied to the polygon. The optional owner is used as return value for GetClosestPointOwner(Vector2).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public int NavpolyAdd(
	NavigationPolygon mesh,
	Transform2D xform,
	Object owner = null
)

Parameters

mesh
Type: GodotNavigationPolygon

[Missing <param name="mesh"/> documentation for "M:Godot.Navigation2D.NavpolyAdd(Godot.NavigationPolygon,Godot.Transform2D,Godot.Object)"]

xform
Type: GodotTransform2D

[Missing <param name="xform"/> documentation for "M:Godot.Navigation2D.NavpolyAdd(Godot.NavigationPolygon,Godot.Transform2D,Godot.Object)"]

owner (Optional)
Type: GodotObject

[Missing <param name="owner"/> documentation for "M:Godot.Navigation2D.NavpolyAdd(Godot.NavigationPolygon,Godot.Transform2D,Godot.Object)"]

Return Value

Type: Int32

[Missing <returns> documentation for "M:Godot.Navigation2D.NavpolyAdd(Godot.NavigationPolygon,Godot.Transform2D,Godot.Object)"]

See Also