public PlannerStateConverter(ProblemDefinition problemDefinition, TStateManager stateManager)
        {
            m_StateManager     = stateManager;
            m_ObjectIdToEntity = new NativeHashMap <TraitBasedObjectId, Entity>(1, Allocator.Persistent);

            BuildTypeCorrespondence(problemDefinition);
        }
        void BuildTypeCorrespondence(ProblemDefinition problemDefinition)
        {
            var traitDefinitions = problemDefinition.GetTraitsUsed().ToArray();

            m_TypeLookup = new NativeHashMap <ComponentType, ComponentType>(traitDefinitions.Length, Allocator.Persistent);

            foreach (var traitDefinition in traitDefinitions)
            {
                // find {Trait}Data type
                if (!TypeResolver.TryGetType($"{traitDefinition.name}Data", out var dataType))
                {
                    continue;
                }

                // find {Trait} type (planner version)
                if (!(TypeResolver.TryGetType($"{TypeHelper.StateRepresentationQualifier}.{traitDefinition.name}", out var plannerType) ||
                      TypeResolver.TryGetType($"{TypeHelper.IncludedModulesQualifier}.{traitDefinition.name}", out plannerType)))
                {
                    continue;
                }

                m_TypeLookup.Add(dataType, plannerType);
            }
        }