Custom object removed by TGB
by Bruno Patatas · in Torque Game Builder · 02/04/2010 (10:13 am) · 3 replies
I have created a custom object derived from t2dStaticSprite, which I can access and use from script without any problems. but when I add it to the scene and then open it in TGB I can´t see that object in the scene graph. The main problem is that if I save the scene TGB removes the custom object from the scene.
I know that it is possible to add custom objects in this way, as if I add a custom object from the platform kit it is correctly preserved. But I can´t figure whats missing in my code.
I have if called the DeclareImplement ConObject macro´s
Any ideas?
I know that it is possible to add custom objects in this way, as if I add a custom object from the platform kit it is correctly preserved. But I can´t figure whats missing in my code.
I have if called the DeclareImplement ConObject macro´s
Any ideas?
#2
02/04/2010 (1:13 pm)
Ok made a few random changes and and did a complete rebuild and then did as you suggested and it´s working perfectly. It even includes fields I declared in InitPersistFields. Thx for your help.
#3
02/04/2010 (11:57 pm)
Probably to be clear, the key here is to make sure you add the custom object to the TorqueGameBuilder project and make sure you recompile that, too.
Milan Rancic
If you cant see the object, try checking the camera/object position if they are within bounds.