im using 2.2.0 right now but i noticed that CC_PREVIEW is true in the build version of the game. even with debug and source map unchecked. tried using 2.2.1 and the issue is still reproducable. Im building for web-mobile games
We can ask @jare to help with this.
In my test, version 2.2.1 not have this bug, Do you build platform is webMobile?
yes we built for webMobile. the bug is caused by this line
else {
defineMacro('CC_DEV', true); // (CC_EDITOR && !CC_BUILD) || CC_PREVIEW || CC_TEST
defineMacro('CC_DEBUG', true); // CC_DEV || Debug Build
defineMacro('CC_JSB', defined('jsb'));
defineMacro('CC_NATIVERENDERER', defined('jsb'));
defineMacro('CC_SUPPORT_JIT', true);
}
// defined in the runtime
defineMacro('CC_TEST', defined('tap') || defined('QUnit'));
defineMacro('CC_EDITOR', defined('Editor') && defined('process') && ('electron' in process.versions));
defineMacro('CC_PREVIEW', !CC_EDITOR);
defineMacro('CC_RUNTIME', 'function' === typeof loadRuntime);
defineMacro('CC_JSB', defined('jsb') && !CC_RUNTIME);
// deprecated
const WECHATGAMESUB = !!(defined('wx') && wx.getSharedCanvas);
const WECHATGAME = !!(defined('wx') && (wx.getSystemInfoSync || wx.getSharedCanvas));
const QQPLAY = defined('bk');
defineDeprecatedMacroGetter('CC_WECHATGAMESUB', WECHATGAMESUB);
defineDeprecatedMacroGetter('CC_WECHATGAME', WECHATGAME);
defineDeprecatedMacroGetter('CC_QQPLAY', QQPLAY);
i think its already fixed in the master
branch of the engine
Thank you,I have confirmed the problem.
1 Like
system
closed
January 28, 2020, 2:39pm
#7
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.