[2.1] camera->_getManager() returns NULL
Posted: Sun Mar 11, 2018 2:47 pm
1. Is there a reason that Camera (actually Frustum also) does not set mManager of base class during constuction, as most other MovableObject types do?
It is convenient to be able to use using _getManager() to know which scene manager to call destroyEntity on when just having an Entity pointer, but it is not possible with Camera.
2. If that is intended, then I guess it is not valid for the user to call camera->_notifyManager(sceneManager) after createCamera, as a workaround?
It is convenient to be able to use using _getManager() to know which scene manager to call destroyEntity on when just having an Entity pointer, but it is not possible with Camera.
Code: Select all
Camera::Camera( IdType id, ObjectMemoryManager *objectMemoryManager, SceneManager* sm )
: Frustum( id, objectMemoryManager ),Code: Select all
Frustum::Frustum( IdType id, ObjectMemoryManager *objectMemoryManager ) :
MovableObject( id, objectMemoryManager, (SceneManager*)0, 1 ),