示例#1
0
    public void Read <T>(ES2Type es2type, T c) where T : class
    {
        if (settings.encrypt)
        {
            ReadEncrypted <T>(es2type, c);
            return;
        }

        if (es2type != null)
        {
            es2type.Read(this, c);
        }
        else
        {
            Debug.LogError("Component of type " + typeof(T).ToString() + "is not supported by Easy Save. If you would like to request that we support this component, please contact us on www.moodkie.com/contact.");
        }
    }
示例#2
0
    public T Read <T>(ES2Type es2type)
    {
        if (settings.encrypt)
        {
            return(ReadEncrypted <T>(es2type));
        }

        if (es2type != null)
        {
            return((T)es2type.Read(this));
        }
        else
        {
            Debug.LogError("Easy Save does not support loading of type " + typeof(T).ToString() + ", or if you are trying to load a collection such as a Dictionary or Array, use the collection methods (for example, LoadDictionary<>() or LoadArray<>()).");
        }

        return(default(T));
    }