Esempio n. 1
0
        public static glTF_VCAST_vci_audio_source CreateFrom(AudioSource audioSource, glTF_VCAST_vci_audios audios)
        {
            var result = new glTF_VCAST_vci_audio_source
            {
                audio        = audios.audios.FindIndex(x => x.name == audioSource.clip.name),
                spatialBlend = audioSource.spatialBlend
            };

            return(result);
        }
Esempio n. 2
0
        public static void Serialize_vci_audioSources_ITEM(JsonFormatter f, glTF_VCAST_vci_audio_source value)
        {
            f.BeginMap();


            if (true)
            {
                f.Key("audio");
                f.Value(value.audio);
            }

            if (true)
            {
                f.Key("spatialBlend");
                f.Value(value.spatialBlend);
            }

            f.EndMap();
        }
Esempio n. 3
0
        public static glTF_VCAST_vci_audio_source glTF_VCAST_vci_audio_sources_Deserializevci_audioSources_ITEM(JsonNode parsed)
        {
            var value = new glTF_VCAST_vci_audio_source();

            foreach (var kv in parsed.ObjectItems())
            {
                var key = kv.Key.GetString();

                if (key == "audio")
                {
                    value.audio = kv.Value.GetInt32();
                    continue;
                }

                if (key == "spatialBlend")
                {
                    value.spatialBlend = kv.Value.GetSingle();
                    continue;
                }
            }
            return(value);
        }