Confused about datablocks.cs
by Tom Cassiotis · in iTorque 2D · 10/12/2011 (6:09 pm) · 2 replies
I have been working on my game on tgb 1.7.5 and thought tonight would be the night I would install iTGB and start rebuilding it.
So I start a new project, created a sprite then added it in the scene. Go to test it and the sprite is nowhere to be seen.
Kick myself a few times for being such a newb then recheck everything, ran the behaviours tutorial successfully (not a environmental thing). Eventually, I got out of the tgb editor and started poking around.
I figured out that the editor added the datablocks in manageddatablocks.cs instead of datalevelsdatablocksemptyLevel_datablocks.cs. I found the code that loads the "datablocks/" @ %levelFileName @ "_datablocks.cs" and so I moved the datablock definitions from the one file to the other and everything is good.
But can someone tell me if I missed a step, some knowledge, or is this a bug?
The steps I took were intuitive to me, Create Project, Give it a Name, Create Sprite, Add it to the scene. I would imagine that this should just work.
So I start a new project, created a sprite then added it in the scene. Go to test it and the sprite is nowhere to be seen.
Kick myself a few times for being such a newb then recheck everything, ran the behaviours tutorial successfully (not a environmental thing). Eventually, I got out of the tgb editor and started poking around.
I figured out that the editor added the datablocks in manageddatablocks.cs instead of datalevelsdatablocksemptyLevel_datablocks.cs. I found the code that loads the "datablocks/" @ %levelFileName @ "_datablocks.cs" and so I moved the datablock definitions from the one file to the other and everything is good.
But can someone tell me if I missed a step, some knowledge, or is this a bug?
The steps I took were intuitive to me, Create Project, Give it a Name, Create Sprite, Add it to the scene. I would imagine that this should just work.
About the author
#2
Thanks Rennie
10/13/2011 (6:05 am)
Oh that was what Mich was doing on the live video stream. I missed what he was saying as the kids were fighting over some board game. And I didn't get back to it.Thanks Rennie
Torque Owner rennie moffat
Renman3000