public UnrealEngineInstance(UnrealItemDescription unrealItem)
    {
        BuildType = UnrealEngineBuildType.Source;

        unrealItem = UnrealItemDescription.RequireUnrealItem(unrealItem.RootPath, UnrealItemType.Project, UnrealItemType.Engine);

        if (unrealItem.Type == UnrealItemType.Project)
        {
            var availableBuilds = FindAvailableBuilds();
            var Configuration   = unrealItem.SanitizeConfiguration(unrealItem.ReadConfiguration <ProjectConfiguration>());
            if (!(Configuration?.UE4RootPath).IsNullOrWhiteSpace())
            {
                RootPath = Configuration.UE4RootPath;
                Uuid     = "<Engine Not Registered>";

                foreach (var(uuid, path) in availableBuilds)
                {
                    if (Path.GetFullPath(path.Item1) == RootPath)
                    {
                        Uuid      = uuid;
                        BuildType = path.Item2;
                        break;
                    }
                }
            }
            else
            {
                UProject project = UProject.Load(unrealItem.FullPath);

                if (!availableBuilds.TryGetValue(project.EngineAssociation, out var item))
                {
                    throw new UEIdNotFound(project.EngineAssociation);
                }

                Uuid      = project.EngineAssociation;
                RootPath  = Path.GetFullPath(item.Item1);
                BuildType = item.Item2;
            }
        }
        else if (unrealItem.Type == UnrealItemType.Engine)
        {
            RootPath = Path.GetFullPath(unrealItem.RootPath);

            var availableBuilds = FindAvailableBuilds();
            foreach (var pair in availableBuilds)
            {
                if (RootPath.StartsWith(Path.GetFullPath(pair.Value.Item1)))
                {
                    RootPath  = pair.Value.Item1;
                    BuildType = pair.Value.Item2;
                    Uuid      = pair.Key;

                    break;
                }
            }
        }

        Version = JsonConvert.DeserializeObject <Version>(
            File.ReadAllText(Path.Combine(BuildPath, "Build.version")));
    }
    public UnrealEngineInstance(string rootPath)
    {
        RootPath  = Path.GetFullPath(rootPath);
        BuildType = UnrealEngineBuildType.Source;

        var availableBuilds = FindAvailableBuilds();

        foreach (var pair in availableBuilds)
        {
            if (RootPath.StartsWith(Path.GetFullPath(pair.Value.Item1)))
            {
                RootPath  = pair.Value.Item1;
                BuildType = pair.Value.Item2;
                Uuid      = pair.Key;

                break;
            }
        }

        if (!Directory.Exists(RootPath))
        {
            throw new UERootNotFound(rootPath);
        }

        Version = JsonConvert.DeserializeObject <Version>(
            File.ReadAllText(Path.Combine(BuildPath, "Build.version")));
    }