コード例 #1
0
 /// <summary>
 /// Delete the selected Area Description.
 /// </summary>
 public void DeleteSelectedAreaDescription()
 {
     if (m_selectedAreaDescription != null)
     {
         m_selectedAreaDescription.Delete();
         RefreshAreaDescriptionList();
     }
 }
    /// <summary>
    /// This is called when disconnected from the Tango service.
    ///
    /// We do clean up the Area Description File that was imported from download.
    /// </summary>
    public void OnTangoServiceDisconnected()
    {
#if !UNITY_EDITOR
        if (Globals.m_curAreaDescription == null && m_loadedAreaDescription != null)
        {
            // This indicates that we joined a room and imported a valid temporary Area Description.
            m_loadedAreaDescription.Delete();
        }

        try
        {
            Directory.Delete(TEMP_FILE_PATH, true);
        }
        catch (DirectoryNotFoundException e)
        {
            Debug.Log("Temp file directory does not exsit.");
        }
#endif
    }
コード例 #3
0
    /// <summary>
    /// Remove area description with xml if exists.
    /// </summary>
    public void RemoveAreaDescription()
    {
        if (m_curAreaDescriptionUUID != null)
        {
            string path = Application.persistentDataPath + "/" + m_curAreaDescriptionUUID + ".xml";
            if (!_DeleteXMLFile(path))
            {
                return;
            }

            AreaDescription areaDescription = AreaDescription.ForUUID(m_curAreaDescriptionUUID);
            areaDescription.Delete();
            _PopulateList();
            m_curAreaDescriptionUUID = null;
        }
        else
        {
            AndroidHelper.ShowAndroidToastMessage("Please, choose an area description in list.");
        }
    }