Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | nightrobin |
For example I have this Singleton Script:
func displayer(int B):
var A = B
...a long processing code...
print(A)
Will the value of A not be consistent if the function is still running and another call this function too?
When one script calls the function, it passes data that’s related to that script. When another script passes data to the function, it passes data from that second script. It is a scope issue. Unless the first script is changing a public variable in the singleton, the second script won’t have the same results.
Ertain | 2021-03-11 15:47
I see. Thanks mate!
nightrobin | 2021-03-12 14:17