Game Development Community

How to add a WorldEditor object to a GUI?

by Emmanuel S · in Torque Game Engine · 06/20/2007 (10:53 am) · 2 replies

Hi everybody,

My project is to build a custom scene editor. I would recreate the scripts and gui from the /creator/editor folder (Editor, EditorGui). I have not found resources or forum threads about this. Any links or pointers are appreciated :)

While trying to build this gui i found out that i can't add a WorldEditor object using the GuiEditor.
So i tried again using a fresh install (absolutely no mods in scripts, not evein main.cs) to check the baseline functionality and still won't work.

The error message " (0): Register object failed for object (null) of class WorldEditor." is issued in the console after selecting "WorldEditor" from the object class selection popup (leftmost dropdown button)

I got this message in the following scenarios (from TorqueDemo.exe fresh from installation, loads tutorial.base)
- start world editor, start gui editor, try to add a second WorldEditor object to the root object (GuiControl)
- start world editor, start gui editor, remove original WorldEditor(EWorldEditor) object and add a new one to the root
- start world editor, start gui editor, new gui, add WorldEditor

I've tried lots of stuff, looking at console traces, etc ... i'm sure someone has run into this before.

Thanks

About the author

Recent Threads


#1
06/24/2007 (2:10 pm)
Seems to me that you are right where I was stuck. I didn't get any responses to a post that I started but what I found from trial and error is that the you want to use GameTSCtrl to display the window. You may also want to take a look at cs files dealing with editorgui. I'm still trying to figure it out I hope this helps. Keep me posted on your updates.....
#2
06/26/2007 (1:03 pm)
Thanks for you input, William.

After some fiddling around, I decided to build a new interface adding functionality as i go, using a mix of the Editor and GuiEdit code. It won't be using the World Editor class object... i just circumvented the problem but this approach will be more educational...

If i figure out how to add the WorldEditor object i'll let you know.