0 votes

There is a way?

asked 6 days ago 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 6 days ago by Zylann (18,381 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.