Example #1
0
        protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(exporter);

            //node.AddSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("m_OutputGroup", OutputGroup.ExportYAML(exporter));
            node.Add("m_MasterGroup", MasterGroup.ExportYAML(exporter));
            node.Add("m_Snapshots", Snapshots.ExportYAML(exporter));
            node.Add("m_StartSnapshot", StartSnapshot.ExportYAML(exporter));
            node.Add("m_SuspendThreshold", SuspendThreshold);
            node.Add("m_EnableSuspend", EnableSuspend);
            node.Add("m_UpdateMode", UpdateMode);
            node.Add("m_MixerConstant", MixerConstant.ExportYAML(exporter));
            return(node);
        }
Example #2
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            //node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add(OutputGroupName, OutputGroup.ExportYAML(container));
            node.Add(MasterGroupName, MasterGroup.ExportYAML(container));
            node.Add(SnapshotsName, Snapshots.ExportYAML(container));
            node.Add(StartSnapshotName, StartSnapshot.ExportYAML(container));
            node.Add(SuspendThresholdName, SuspendThreshold);
            node.Add(EnableSuspendName, EnableSuspend);
            node.Add(UpdateModeName, UpdateMode);
            node.Add(MixerConstantName, MixerConstant.ExportYAML(container));
            return(node);
        }
Example #3
0
        /*private static int GetSerializedVersion(Version version)
         * {
         #warning TODO: serialized version acording to read version (current 2017.3.0f3)
         *      return 2;
         * }*/

        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            OutputGroup.Read(stream);
            MasterGroup.Read(stream);
            m_snapshots = stream.ReadArray <PPtr <AudioMixerSnapshot> >();
            StartSnapshot.Read(stream);
            SuspendThreshold = stream.ReadSingle();
            EnableSuspend    = stream.ReadBoolean();
            stream.AlignStream(AlignType.Align4);

            UpdateMode = stream.ReadInt32();
            stream.AlignStream(AlignType.Align4);

            MixerConstant.Read(stream);
            stream.AlignStream(AlignType.Align4);
        }
Example #4
0
        /*public static int ToSerializedVersion(Version version)
         * {
         #warning TODO: serialized version acording to read version (current 2017.3.0f3)
         *      return 2;
         * }*/

        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            OutputGroup.Read(reader);
            MasterGroup.Read(reader);
            Snapshots = reader.ReadAssetArray <PPtr <AudioMixerSnapshot> >();
            StartSnapshot.Read(reader);
            SuspendThreshold = reader.ReadSingle();
            EnableSuspend    = reader.ReadBoolean();
            reader.AlignStream();

            UpdateMode = reader.ReadInt32();
            reader.AlignStream();

            MixerConstant.Read(reader);
            reader.AlignStream();
        }