                 pos.z = -pos.z; // Convert to lefthanded
                 rot = GetVector3FromStrings(coords, 3);
                 scale = GetVector3FromStrings(coords, 6);
+                parentName = GetComponentAttribute(compElem, "Parent entity ref");
             }
             
             compElem = compElem.GetNext("component");

    }
}

void ImportTundraScene(const String&in fileName)
{
    fileSystem.CreateDir(sceneResourcePath + "Materials");
    fileSystem.CreateDir(sceneResourcePath + "Models");
    fileSystem.CreateDir(sceneResourcePath + "Textures");
    
    XMLFile source;
    source.Load(File(fileName, FILE_READ));
    String filePath = GetPath(fileName);

    XMLElement sceneElem = source.root;
    XMLElement entityElem = sceneElem.GetChild("entity");
    
    Array<String> convertedMaterials;
    Array<String> convertedMeshes;

    // Clear old scene, then create a zone and a directional light first
    CreateScene();

            model.castShadows = castShadows;
            for (uint i = 0; i < materialNames.length; ++i)
                model.materials[i] = cache.GetResource("Material", "Materials/" + materialNames[i].Replaced(".material", ".xml"));
                
            // Store pending parent assignment if necessary
            if (!parentName.empty)
            {
                ParentAssignment assignment;
                assignment.childID = newNode.id;
                assignment.parentName = parentName;
                parentAssignments.Push(assignment);
            }
        }

        entityElem = entityElem.GetNext("entity");
    }

    // Process any parent assignments now
    for (uint i = 0; i < parentAssignments.length; ++i)
    {
        Node@ childNode = editorScene.GetNodeByID(parentAssignments[i].childID);
        Node@ parentNode = editorScene.GetChild(parentAssignments[i].parentName, true);
        if (childNode !is null && parentNode !is null)
            childNode.parent = parentNode;
    }

    UpdateSceneWindow();
