Is there a way to determine WHAT script is calling to enable another script?
Ran into a bug. Long story short is.. that after the player dies and the scene reloads, a script is enabling two scripts that should have died with the player does not. I tried deleting those two scripts just to see what error messages I get for the scripts that are trying to enable those 2 scripts are but I have looked at them and they seem fine. . I don't see anything in those scripts to explain it . so...is there a way to put in those pesky scripts a line or two of code to state what enabled them ? something like:
using UnityEngine;
using System.Collections;
public class whatTheHeckIsGoingOn : MonoBehaviour {
OnEnable(){
print (tell me what script is saying to enable this script);
}
////////////////////
yeah, I know that code is nonsense, but do you get the picture?
p.s I know I will spend ALL DAY tomorrow and $$anonymous$$AYBE find the solution. And I also know that 95% of any question I ask here goes completely ignored. But on the odd chance that somebody out there can reply. Even if to tell me "no, it can't be done" would be nice. I find that I answer - or at least give AN answer ( wrong, right, maybe not the best - but at least I make an effort) whenever I get these questions posted to my email. Because I $$anonymous$$NOW how it is to be utterly ignored. So, please, if you read this far, say "I don't know". I will not down vote you for acknowledging I exist