static public void Watch(object target, bool shouldShowNonPublic, string targetName) { if (target == null) { return; } if (targetName == null) { if (target is Type) { targetName = (target as Type).Name; } else { targetName = target.GetType().Name; } } if (_instance == null) { _instance = new RXWatcher(); } _instance.DoWatch(target, targetName, shouldShowNonPublic); }
static public void Watch(object target, bool shouldShowNonPublic, string targetName) { if (target == null) { return; } if (targetName == null) { if (target is Type) { targetName = (target as Type).Name; } else { targetName = target.GetType().Name; FLabel targetAsLbl = target as FLabel; if (targetAsLbl != null) { targetName += " - '" + targetAsLbl.text + "'"; } else { FSprite targetAsSprite = target as FSprite; if (targetAsSprite != null) { targetName += " - '" + targetAsSprite.element.name + "'"; } } } } if (_instance == null) { _instance = new RXWatcher(); } _instance.DoWatch(target, targetName, shouldShowNonPublic); }