How can a custom function be used as a boolean inside an ‘if’ statement in a different script than the instance of the function?
Ascript = script you want to make the call to B from
Bscript = script you want to call with the custom function in.
in the Bscript make the function public.
Aobject = gameobject Ascript is attached to
Bobject = gameobject Bscript is attached to
the easiest is to have both A and B script attached to the same gameobject
Otherwise you have to have Ascript search the scene for the object with B in it.
once you have Bobject.
Bobject.GetComponent<Bscript>().Function();