diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2018-02-18 19:50:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-18 19:50:45 +0100 |
commit | f4dcfa38f72751a26877d63a15a58b03f63a21b4 (patch) | |
tree | 98311b5846a44df7efc50e18834d0a8e97f2880b /modules/mono | |
parent | ba0ec2ffd24c6d502c8f171281125b94353444d8 (diff) | |
parent | 3c1f8efd9e5066ded2d36e99ce40511fdea79488 (diff) |
Merge pull request #16747 from PJB3005/18-02-16-nodepath-tostring
Give C# NodePath a ToString().
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 62c7a94755..70f1b198a2 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -2231,7 +2231,8 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { "this." BINDINGS_PTR_FIELD " = NativeCalls.godot_icall_NodePath_Ctor(path);\n" CLOSE_BLOCK_L2 MEMBER_BEGIN "public static implicit operator NodePath(string from)\n" OPEN_BLOCK_L2 "return new NodePath(from);\n" CLOSE_BLOCK_L2 MEMBER_BEGIN "public static implicit operator string(NodePath from)\n" OPEN_BLOCK_L2 - "return NativeCalls." ICALL_PREFIX "NodePath_operator_String(NodePath." CS_SMETHOD_GETINSTANCE "(from));\n" CLOSE_BLOCK_L2); + "return NativeCalls." ICALL_PREFIX "NodePath_operator_String(NodePath." CS_SMETHOD_GETINSTANCE "(from));\n" CLOSE_BLOCK_L2 + MEMBER_BEGIN "public override string ToString()\n" OPEN_BLOCK_L2 "return (string)this;\n" CLOSE_BLOCK_L2); builtin_types.insert(itype.cname, itype); // RID |