Discussion: New Class Wizard improvements

Hey,

I’m slated to do some work on improving the new class wizard, and I was hoping to get some feedback about what features you felt it needed.

I’ve already done some work to improve it (you can now choose where to place the newly added classes, and it also now correctly supports Public/Private folder layouts); these changes didn’t make it into 4.1, but if you want to try them out early then you can just grab the following two revisions:

My own thoughts are that we need to support non-UObject classes, as the VS class wizard puts classes in the Intermediate folder, so we need to be able to create standard C++ classes. Additional support for creating Slate widget and widget styles classes would be a bonus.

Hi Jamie,

What do you mean by “choose where to place new classes”? Can we now have subfolders in Source? If so, that will be great! I can’t think of any issue with the Class Wizard right now.

One thing that bothered me, is adding new classes from VS. When I’m making bigger changes to the game code, I’ll quit the Unreal Editor anyway, because I’ll have to recompile the game. When I’m doing this, I have to start the editor just to add a new class to my project. It would be nice if the same thing could be done from VS itself. Wouldn’t it be possible to make the Class Wizard a separate program, or something that can start on its own and make it usable from VS?

P.S Are you from Epic? You don’t seem to have the Unreal tag that your colleagues have.

Yep, here’s some screenshots showing creating a new actor class. The first two shows how it behaves with the Public/Private folder layout, and the latter shows how it behaves without. This is already available (you’d need those two revisions I listed above).

Hmm, I’m going to say “probably not” since the class wizard relies on having your game classes available to perform its validation (which means it has to have loaded your games editor module). I’d suspect that’s far too heavyweight to strip out into its own application… I’ll bear it in mind though.

Oops, fixed :slight_smile:

The new wizard looks nice! Will this be in 4.2?

What kind of validation does the class wizard perform? Checking for name collisions? What’s the worst that could happen if you skipped the validation?

If using the editor’s wizard from VS is not feasible, would it be possible to share the C++ templates and somehow integrate them with VS? I looked into creating custom C++ templates for VS a while ago, but either I looked at the wrong place or it’s more complicated than it should be. I thought you could just create some files with placeholders in them, put them in a special folder and that would be it. At least, this is how you can create templates in Xcode.

Yep, it only missed the 4.1 cut-off by a couple of days.

Exactly that. I imagine you’d either get a compile or UHT error about duplicate type names.

Interesting. I didn’t know you could extend the VS class wizard yourself, but I guess it makes sense thinking about it. The main issue we have with that is that it puts the code with the project file (which is inside the Intermediate folder)… if we could stop it doing that then that would help greatly. I’ll investigate this as a possibility, thanks.

Could you add UStruct, UInterface, and IDetailCustomization options to the wizard? I’m tired of jumping through hoops to make them and copy-pasting to make sure everything works, and I just spent several fruitless hours this morning trying to make a UInterface before having to give up before I put my fist through my monitor.