I'm trying to create a wrapper around a logging method (Debug.Log) in Unity3d. What I want to do is declare a variable inside whatever class I happen to be working on to shorthand MyDebug.Log('something') into just L('something'). My problem is I can't figure out how to actually store a reference to the method like that.
Asked
Active
Viewed 3,014 times
4
-
4Use a `delegate`? And may be accept a few more answers on SO. – Jonathan Wood Apr 30 '11 at 00:07