Harry
Member
|
Materials groupping
In the past there was user_type field in Material class allowing to group material to certain class of materials like stone, glass, grass and so on.
It looks like this feature does not exist in the engine anymore. Does the engine supports similar feature? My idea for now is to create lookup tables of materials belonging to certain types but it does not sound as convenient as old feature.
|
|
02-14-2020 09:27 PM |
|
Esenthel
Administrator
|
RE: Materials groupping
You can do:
Code:
/******************************************************************************/
struct MaterialEx : Material
{
UInt type;
MaterialEx()
{
type=123;
}
};
void InitPre()
{
Materials.replaceClass<MaterialEx>();
After that you can cast all materials from 'Materials' cache into 'MaterialEx' class
|
|
02-15-2020 04:39 AM |
|