Code: Select all
struct SGeneralProperties {
//Allow items to be compared with if statements
inline bool operator==(const SGeneralProperties& rhs) const { return 0 == memcmp(this, &rhs, sizeof(rhs)); }
inline bool operator!=(const SGeneralProperties& rhs) const { return 0 != memcmp(this, &rhs, sizeof(rhs)); }
string sItemName, sItemDesc, sPickupMsg;
};
static void ReflectType(Schematyc::CTypeDesc<SGeneralProperties>& desc) {
desc.SetGUID("{D6309FAC-0129-4558-B0D8-403B779517F0}"_cry_guid);
desc.SetLabel("General Properties");
desc.SetDescription("General properties");
desc.AddMember(&SGeneralProperties::sItemName, 'inam', "ItemName", "Item Name", "Name of this item.", "");
desc.AddMember(&SGeneralProperties::sItemDesc, 'ides', "ItemDesc", "Item Desc", "Description of this item.", "");
desc.AddMember(&SGeneralProperties::sPickupMsg, 'pmsg', "PickupMsg", "Pickup Message", "Message shown when an item can be picked up.", "");
}
Reflection/TypeDesc.h(563): error C2338: Type must be reflected, see TypeDesc.h for details!
1>c:\users\test\documents\cryengine projects\survival\code\components\ItemProperties.h(75): note: see reference to function template instantiation 'Schematyc::CClassMemberDesc &Schematyc::CClassDescInterface<TYPE,Schematyc::CClassDesc>::AddMember<string,char[1],SGeneralProperties>(MEMBER_TYPE SGeneralProperties::* ,uint32,const char *,const char *,const char *,const MEMBER_DEFAULT_VALUE_TYPE (&))' being compiled
with
[
TYPE=SGeneralProperties,
MEMBER_TYPE=string,
MEMBER_DEFAULT_VALUE_TYPE=char [1]
]