New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ccConfig.h CC_CONSTRUCTOR_ACCESS is public #13678
Comments
In fact, it helps with all the classes for JS bindings, if you don't write your game in JS, you can turn it into protected, it won't affect anything. But in JSB, the value must be public. As we merged Cocos2d-JS into Cocos2d-x in v3.7, this is obligated. |
@pandamicro if that's the case should we not only define public if bindings are in use? Having protected constructors and init methods when working in c++ enforces the create() paradigm correctly.
|
That's a good idea, we can do that |
It's done |
Currently changing the value of
The problem is the marked line shown below.
But changing
How should these issues be handled? |
CC_CONSTRUCTOR_ACCESS comment says default is 'protected', as it should be given the create() paradigm. However the default value is 'public', and was changed to aid binding Sprite3D. Perhaps if Sprite3D is an edge case it should not use the macro?
https://github.com/cocos2d/cocos2d-x/blob/v3/cocos/base/ccConfig.h
Last related change: f4b5751
The text was updated successfully, but these errors were encountered: