void GameObject::AddMakedComponent(type_index TypeIndex, const shared_ptr<Component>& component) { if (!SearchComponent(TypeIndex)) { /** Not Component AddList */ pImpl->m_ComponentList.push_back(TypeIndex); } /** Add Attached Component */ pImpl->m_ComponentData[TypeIndex] = component; component->AttachGameObject(GetThis<GameObject>()); }
void GameObject::SetTransform(const shared_ptr<Transform>& transform) { transform->AttachGameObject(GetThis<GameObject>()); pImpl->m_Transform = transform; }