Exemplo n.º 1
0
        protected override IDataSerializer CreateDataSerializerForOdin()
        {
            IDataSerializer dataSerializer = null;

#if ODIN_SERIALIZER
            dataSerializer = new OdinDataSerializer(m_dataFormat);
#endif
            return(dataSerializer);
        }
        protected IDataSerializer CreateDataSerializer()
        {
            // choose what serializer you want to use
            IDataSerializer dataSerializer = null;

            switch (m_serializerType)
            {
            case DataSerializerType.JsonUtility:
                dataSerializer = new JsonDataSerializer();
                m_adapterType  = DataSerializationAdapterType.Concrete;
                break;

            case DataSerializerType.Odin:
                dataSerializer = new OdinDataSerializer(m_dataFormat);
                break;
            }

            return(dataSerializer);
        }