If I call a function that is on a different script...?
If I call a function that is on script A, and I am calling it on script B. Then will object A or object B be effected. Basically I am trying to run a function from my script that is attatched to another object whenever something happens in script B. Will it effect the object I want it to (the object with the script with the function attatched to it, or object A in this case) or will it be applied to the object with the script from which I am calling the function.
If it is confusing then let me know! I can elaborate.
Answer by getyour411 · Sep 05, 2015 at 10:41 PM
It affects Object B (most likely); obviously if you have a method on Object B called ObliterateObjectA and call it, Object A is likely to take a hurting but it all depends on what your code is doing. I think the fundamental answer you are after though is yes it affects the object with the script on it.
Thanks for the fast reply!
I have just finished up the code so I will do some testing and if that is indeed the case I will let you know :P