| 941 | } |
| 942 | |
| 943 | void EntitySystemHelpersBase::BindComponent(StringView name, ComponentTypeIndex id) |
| 944 | { |
| 945 | STDString const* pName; |
| 946 | auto it = componentNameToIndexMappings_.find(STDString(name)); |
| 947 | if (it == componentNameToIndexMappings_.end()) { |
| 948 | auto iit = componentNameToIndexMappings_.insert(std::make_pair(name, IndexMappings{id, UndefinedReplicationComponent})); |
| 949 | pName = &iit.first->first; |
| 950 | } else { |
| 951 | it->second.ComponentIndex = id; |
| 952 | pName = &it->first; |
| 953 | } |
| 954 | |
| 955 | auto& binding = ecsComponentData_.GetOrAdd(id); |
| 956 | binding.Name = pName; |
| 957 | } |
| 958 | |
| 959 | void EntitySystemHelpersBase::BindReplication(StringView name, ReplicationTypeIndex id) |
| 960 | { |