Game Development Community

New components are not appearing in TXB

by Aiyra · in Torque X Platformer Kit · 08/19/2009 (3:21 pm) · 5 replies

Hi all.
I created a new project with the PlatformerStarterGame template and a new component to allow multiplayer, but TXB doesn't recognize it. Using the StarterGame2D template, everything works fine.
With PSK, what do I need to do to make my new components visible in TXB?

I'm using TX2D 3.0 and PSK 3.0.

Thanks

#1
08/19/2009 (8:52 pm)
Have you added [TorqueXmlSchemaType] above your class definition and above any public functions that you want to expose to TXB?
#2
08/20/2009 (3:56 pm)
Hi Tom. Thanks for your response.

Yes, I have. But the myschema.txschema is not being updated automatically when I build the project. That's why TXB isn't recognizing the new components.

Not only new components, but also new public properties in components that already exists.
For example, I added the public propertie PlayerNumber in the PlayerActorComponent:
[TorqueXmlSchemaType(DefaultValue = "0")]
        public int PlayerNumber
        {
            get { return _playerNumber; }
            set { _playerNumber = value; }
        }
But TXB ignores it.

To make things work, I need to update myschema.txschema manually every time I add a new component or new public property.

The curious thing is that when I use the PlatformDemo template, everything works fine, but not with PlatformStarterGame.
#3
08/20/2009 (8:14 pm)
I'm not at my laptop right now so I don't have exact locations, but go into the solution properties to the post build events. There should be a script in there that rebuilds the schema file. Copy it over from the working project to the non working one.
I'll post the detailed info later tonight if you haven't found it yet.
#4
08/21/2009 (10:27 am)
Thanks, man. It worked!
The exact location is:
Game Properties/Build Events/Post-build event command line.

Thanks again, Tom.
#5
02/11/2010 (10:20 pm)
How do you go about adding multi player to the platformer x kit for torque x... I cant figure out what code to use .. Please help