Is there any way to do this?
The use case is stuff like a throw helper, where you toss an exception or log item from some method but you don’t want that call to show up in the stack trace.
Here’s another example:
public static class GameObjExtension{
public static void Log( this MonoBehaviour mono, String msg ){
Debug.Log( mono.gameObject.name + ":" + msg );
}
}
.... usage like:
public class ABC : MonoBehaviour{
public void Awake(){
this.Log( "include my game object's name in the log automatically" );
}
}
But when you click the log item in the editor, it would jump to ABC’s Awake call not GameObjExtension.
Is there like a MethodImpl tag or something tricky and hidden?