Closed MartinHowarth closed 4 years ago
One way to test without gui is the one used in repo\utest, have you seen that?
Your proposed change, make camera a property lazy initialized, is not complex, but will add a call in each cocosnode when the scene draws. And calls are relativelly costly in python.
What if in your testing situation you do
class FakeCamera:
pass
import cocos.camera
cocos.camera.camera = FakeCamera
or similar?
Ok, you're right to be concerned about performance for such a core component - I'll just mock it out instead.
This is to allow non-gui testing of cocosnode functionaliy (and subclasses in downstream users code).
I've got a PR for this, will update momentarily.