How to register properly my custom component?

Hi guys!
I’m fairly new in LY, and I’m trying to figure out with registering of the components. Recently I tried to create my own component for an entity.
It compiles finely without any errors.
But something going wrong, during LumberyardEditor starting… and I got this error


this is my code :

header -

cpp -

also I add MyComponent in “module” for reginster with pushing in to descriptors;

            MyProject123Module() : CryHooksModule()
// Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.

Yep, there is various UUID because I tried to generate few times new UUID, I’m just thinking maybe something wrong with it. But error raise with any UUID. Moreover, now I compile whole engine and if I register my custom component in discriptors table The LY Editor just won’t starting (without any errors). And if I comment the registration of component the LYEditor starts fine. So what a cause of this behaviour ? Oo

I found my mistake
It’s raise an error with original engine’s binaries and silently “doing nothing” with my compiled engine binaries - because of the line

AZ::EditContext* edit = serialize->GetEditContext();

need to be place in upper if-statment block (not out side it!). So working code now look like this -

	void MyComponent::Reflect(AZ::ReflectContext *context)
AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context);
if (serialize)
serialize->Class<MyComponent, AZ::Component >()
->Field("Value", &MyComponent::m_value)
AZ::EditContext* edit = serialize->GetEditContext();
if (edit)
edit->Class<MyComponent>("My Component", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::Category, "MyProject123")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
->DataElement(AZ::Edit::UIHandlers::Default, &MyComponent::m_value, "Value", "How much value is big.");

The UUID for MyComponent in your header file is


, which is not what’s appearing in your error message. Are you sure you’re building the right file?

I’m just using as a example code base in dir “Lumberyard\\dev\MultiplayerSample\Gem\Code\Source\Components”

my component almost have the same major code parts, to showapping in editor’s pop-up menu with components, and I’m just curious why it’s not working for me? With original engine’s binaries it was raising some error(prev. pic), but now it just silently ignore