I am using Creator 3.4.1
I see adding Custom Macro
option inside Project Settings.
- May i know how to use in TS?
- Also if its not selected then those code will be avoided at compile-time?
I am using Creator 3.4.1
I see adding Custom Macro
option inside Project Settings.
import * as custom_macro from "cc/userland/macro";
if (custom_macro.DEFINED_MACRO) {
// TODO
}
@runzelin Thanks for reply.
but about my second question
if its simple if/else that means it wont removed at compile time, right?
you right. it won’t removed at compile time. enable or disable the macro before compile.