0 votes

There is a way?

asked Aug 15 in Engine by JulioYagami (427 points)

1 Answer

+2 votes
Best answer

You can't get the caller of a function, there is no point doing that. If you really need to, just pass it as an argument, like so:

First node:


Second node:

func the_function(caller):
    print("Called by ", caller)
answered Aug 15 by Zylann (18,389 points)
selected 6 days ago by JulioYagami
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.