UE3 - UDK Is there a way to get a list of subclasses of a class?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

kiff

That guy from Texas. Give me some Cash
Jan 19, 2008
3,793
0
0
Tx.
www.desert-conflict.org
I want to traverse the subclass tree of a given class. Specifically, I want to find all of the subclasses of Weapon and sort/categorize them by certain property values. Is there a way to do this?

Right now I'm using: array< class<Weapon> > MyWeaponClasses that is filled out by hand in the def props. Works fine, but I'd prefer not having to do this.
 
Last edited:

AnthraX

New Member
Aug 3, 2005
20
0
0
39
Ghent (Belgium)
Or you could brute force it by dynamicloadobject'ing everything. DynamicLoadObject("SomePackage.NonExistantClass", class'class', true) will still cause the entire package to be loaded. To get the list of .u packages worth loading you can either iterate through the .int files (using GetNextInt) or you can use the "dir" consolecommand and load everything from there.
 

kiff

That guy from Texas. Give me some Cash
Jan 19, 2008
3,793
0
0
Tx.
www.desert-conflict.org
Interesting... yea, the output of "obj classes" has exactly what I need. I think it would only be realistic if I moved all of my weapon's code to their own package and only force it to load that. thanks!

edit: haven't tried it yet, but I'm thinking that moving the weapons to their own package might cause some dependency issues.
 
Last edited: