Awesome
ME.Macros
Unity 3D Macros System
Features
- Source macros in script files
- Source macros in text files
Using
In any file (text or script) declare macros:
Simple:
#region source macros MACROSNAME
var anyCode = 0;
++anyCode;
#endregion
Advanced:
#region source macros MACROSNAME
var anyCode = 0;
++anyCode;
{someCode1}
{someCode2}
#endregion
In any file (where you want to use it):
Simple:
#region macros MACROSNAME
#endregion
Advanced:
#region macros MACROSNAME (someCode1: var a = "test";, someCode2: Debug.Log(a);)
#endregion
Result:
Simple:
#region macros MACROSNAME
/* This code is auto-generated
* Do not change it
*/
var anyCode = 0;
++anyCode;
#endregion
Advanced:
#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