Unity 3D Macros System
- Source macros in script files
- Source macros in text files
In any file (text or script) declare macros:
#region source macros MACROSNAME
var anyCode = 0;
++anyCode;
#endregion#region source macros MACROSNAME
var anyCode = 0;
++anyCode;
{someCode1}
{someCode2}
#endregionIn any file (where you want to use it):
#region macros MACROSNAME
#endregion#region macros MACROSNAME (someCode1: var a = "test";, someCode2: Debug.Log(a);)
#endregion#region macros MACROSNAME
/* This code is auto-generated
* Do not change it
*/
var anyCode = 0;
++anyCode;
#endregion#region macros MACROSNAME (someCode1: var a = "test";, someCode2: Debug.Log(a);)
/* This code is auto-generated
* Do not change it
*/
var anyCode = 0;
++anyCode;
var a = "test";
Debug.Log(a);
#endregion