Exemplo n.º 1
0
    public bool Initialize(string robot_xml_path, string mapping_path, string asset_basedir)
    {
        gameObject.name = string.Format("Scene({0})", robot_xml_path);

        if (!robot_loader_.LoadRobot(robot_xml_path, asset_basedir))
        {
            Logger.Error("SceneInstance::InitializeLocal::Could not load robot from: {0}.", robot_xml_path);
            return(false);
        }

        if (!state_loader_.Initialize(mapping_path))
        {
            Logger.Error("SceneInstance::InitializeLocal::Could not initialize state loader mappings from: {0}.", mapping_path);
            return(false);
        }

        foreach (Camera scene_camera in GetComponentsInChildren <Camera>())
        {
            cameras_.Add(scene_camera.name, scene_camera);
        }

        return(true);
    }