Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration Error #370

Open
pcb050628 opened this issue Feb 5, 2024 · 0 comments
Open

Registration Error #370

pcb050628 opened this issue Feb 5, 2024 · 0 comments

Comments

@pcb050628
Copy link

pcb050628 commented Feb 5, 2024

In the function add_item(std::unique_ptr<type_data> obj), there is no problem with obj. However, when it enters the type_register::register_type(type_data* info) function, issues occur with obj.
The value in the bool variable is 52

// header
#pragma once
#include "Script.h"

class HumanoidScript :
public Script
{
RTTR_ENABLE()
RTTR_REGISTRATION_FRIEND
private:
GameObject* Head;
GameObject* Body;
DIRECTION HeadDir;
DIRECTION BodyDir;

public:
virtual void Init() override;
virtual void Update() override;

public:
void SetHeadDir(DIRECTION _dir) { HeadDir = _dir; }
void SetBodyDir(DIRECTION _dir) { BodyDir = _dir; }

DIRECTION GetHeadDir() { return HeadDir; }
DIRECTION GetBodyDir() { return BodyDir; }

public:
HumanoidScript();
~HumanoidScript();
};

RTTR_REGISTRATION
{
rttr::registration::class_("HumanoidScript")
.constructor<>();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant