Jump to content

Method to add component by string name in C++


Dreikblack
 Share

Recommended Posts

So it would be something like: virtual shared_ptr<Component> AddComponent(const WString& componentName, const bool start = true);

And if component is not registered or something it would return nullptr

Such method would increase flexibility and allow to recreate an entity from a save file with components.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...