(06-14-2016 07:00 AM)RedcrowProd Wrote: something like this might work:
Code:
class ClassInfo
{
enum AllyourEnumhere
{
Spook,
}
AllyourEnumhere MyEnum;
UID myUID;
}
ClassInfo MyClass[]=
{
{ClassInfo.Spook, UID(4228050782, 1084811514, 2321151892, 3995373297)},
int MyClasses() {return Elms(MyClass);}
and you can just populate it with more, so you have like a class with 1 enum with all the UID in it. that's normaly how i use it
i really appreciate your trying to help , i really hope you would understand this time xD .
what you wrote is my problem , i don't want to insert the UIDs manually , let's say i have 200 object , so i have to do
ClassInfo.Spook, UID(4228050782, 1084811514, 2321151892, 3995373297) for each one ?
i just want whenever my app starts create in some way a container with all the UIDs of my objects in it.
it would be nice if i can just do :
Code:
foreach obj under Objects dir :
container[i] = obj.UID()
let's say i have four 3d objects of fruit (apple,orange,banana,kiwi), for each i have variations (like red apple , green ...) would define params like :
str type ,str color, str size, ....
in code (if i have that container) i would do :
Code:
foreach obj in container:
ObjPtr p = ObjPtr(obj);
if (Compare(p->getParam("type"),"apple")) {
if (Compare(p->getParam("color"),"green")) {
do stuff with ...
}
}