Game Development Community

Schema for TGB is not being refreshed when I add more public properties

by Jesús Bosch · in Torque X 2D · 07/30/2009 (12:51 pm) · 2 replies

Hi,

I'm a very veginner in the "torque universe" using TX2D under XNA, with a VS2008 Professional Edition, using the platformer kit.

I've a public compnent that inherits from ActorComponent, I'm adding new public properties (like T2DAnimationData properties, to be able to add new actions to my Actor).

When I add these properties, and compile the solution, the TXB is not asking for a refresh of the schema... (I think the schema file is not being refreshed).

Im also working with SVN source control... (the project files are checked out).


Some Idea?


Thanks




#1
07/31/2009 (3:33 am)
Try adding [TorqueXmlSchemaType] the line before the class like:
[TorqueXmlSchemaType]
public class MyComponent { }
#2
07/31/2009 (9:13 am)
Thanks Chrostpher!, I already have that attribute at my component class.

But I discovered the source of the error, it may be useful for other people:

At the project "game", right click, then "game properties", then "compilation events" tab, it is necessary to add this event (my project had a different one, I don't know why):

if "$(PlatformName)"=="x86" "$(TargetPath)" -exportschema "$(ProjectDir)myschema.txschema"