コード例 #1
0
    public Dictionary <string, object> Load(bool destroyUnloaded = false)
    {
        //create new dictionary to contain data for characterbase
        Dictionary <string, object> dataDictionary = new Dictionary <string, object>();

        if (!uuid)
        {
            return(dataDictionary);
        }

        //load dictionary
        DataPersitanceHelpers.LoadDictionary(ref dataDictionary, uuid.ID);

        ////if dictionary is empty then we assume no saved data for the object, so destroy it
        //if (destroyUnloaded && (dataDictionary == null || dataDictionary.Count == 0))
        //    gameObject.SetActive(false);

        //load transform
        DataPersitanceHelpers.LoadTransform(ref dataDictionary, transform, "persistantTransform");

        return(dataDictionary);
    }