Game Development Community

[UNRESOLVED] TORQUE_PLAYER and onAddToScene

by Aaron Miller · in Torque Game Builder · 05/24/2010 (5:34 pm) · 1 replies

Has anyone had problems with onAddToScene not being called while running a project in MSVC 2008?

onAddToScene isn't getting called in my build of TGB 1.7.5 when debugging under MSVC 2008. It *is* being called from the Editor and when I run using Torsion, but the code I see referencing it is #ifdef'd out because TORQUE_PLAYER is not defined.

Any clues or things I could try?

#1
06/02/2010 (8:56 pm)
Can anyone tell me if TORQUE_PLAYER or TORQUE_TOOLS is defined in their TGB 1.7.5 build running Microsoft Visual C++ 2008. The problem I seem to be having relates to line 38 in torqueConfig.h

#ifndef TORQUE_PLAYER
#  define TORQUE_TOOLS
#else
#  undef TORQUE_TOOLS
#endif

When I look at t2dSceneObject.cc, in the onAdd method of t2dSceneObject I see

#ifndef TORQUE_TOOLS
    if (getSceneGraph())
       Con::executef(this, 2, "onAddToScene", getSceneGraph()->getIdString());
#endif

No TORQUE_TOOLS, no onAddToScene.