Merge pull request #1 from microsoft/upmPackage

Upm package formatting and new functionality
This commit is contained in:
Joe Kelly 2023-08-30 15:53:21 -07:00 коммит произвёл GitHub
Родитель c4ab35143d 019d51a2d9
Коммит c1ad26f82d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
121 изменённых файлов: 1493 добавлений и 3803 удалений

Просмотреть файл

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 12a6224d5ee7bf543a0e8f0a4e649b8b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 6a3776b0c601bde47abac312e969b2ec
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 57efa9e8cd377fb439de8d4aef14c55e
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: b48798d283806774f9d13fe0c900f0c0
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 97f015b418081d54dabc23854ac24f21
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 5ad63cb2c22ab134098a0e7854e1311e
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 810e6dca8ef71344cbc890b34671250f
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: bc7078a21c54a5f43abe62c0892d09ac
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: eb1ecc6af91d07446aae1b3f303005d3
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: d2984ecc43800284c8ce6b9cf4979a1f
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: ff1cfe55b3fd386498dcb18e986acc34
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: c01b9eb07d6d92245b376b002ce15581
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 0ba1d994397160b4fb15379cc06d3d28
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: a3e78a024797c8548851dd0438a4f7d1
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Двоичный файл не отображается.

Просмотреть файл

@ -1,22 +0,0 @@
fileFormatVersion: 2
guid: 90010d72328cde74c828e489a0309387
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -1,311 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 10
m_Resolution: 2
m_BakeResolution: 10
m_AtlasSize: 512
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 256
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &170076733
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 170076735}
- component: {fileID: 170076734}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &170076734
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 170076733}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 1
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &170076735
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 170076733}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &534669902
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 534669905}
- component: {fileID: 534669904}
- component: {fileID: 534669903}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &534669903
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
--- !u!20 &534669904
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &534669905
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &722408568
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 722408569}
- component: {fileID: 722408570}
m_Layer: 0
m_Name: AudioTester
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &722408569
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722408568}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &722408570
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 722408568}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: da600e0031fc1c44eba2e58a94541e97, type: 3}
m_Name:
m_EditorClassIdentifier:
testKey: 102
testEvent: {fileID: 114152458844612320, guid: f29ce946b43dd2242b0bf4d8b57d9aee,
type: 2}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f29ce946b43dd2242b0bf4d8b57d9aee
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 03cd4d99c78e6914e84481d0ea476a66
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -1,21 +0,0 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.MixedReality.Toolkit.Audio;
using UnityEngine;
public class AudioManagerDemo : MonoBehaviour
{
[SerializeField]
private KeyCode testKey = KeyCode.F;
[SerializeField]
private AudioEvent testEvent = null;
private void Update()
{
if (Input.GetKeyDown(testKey))
{
AudioManager.PlayEvent(testEvent, gameObject);
}
}
}

Просмотреть файл

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 711e853b8bbc4324aa65dff71a1b74df
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -1,259 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 10
m_Resolution: 2
m_BakeResolution: 10
m_AtlasSize: 512
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 256
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &170076733
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 170076735}
- component: {fileID: 170076734}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &170076734
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 170076733}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 1
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &170076735
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 170076733}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &534669902
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 534669905}
- component: {fileID: 534669904}
- component: {fileID: 534669903}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &534669903
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
--- !u!20 &534669904
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &534669905
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

Просмотреть файл

Просмотреть файл

@ -4,8 +4,6 @@
using UnityEngine;
using UnityEditor;
#if UNITY_EDITOR
namespace Microsoft.MixedReality.Toolkit.Audio
{
/// <summary>
@ -39,5 +37,3 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
}
#endif

Просмотреть файл

@ -6,7 +6,6 @@ using UnityEngine;
using UnityEngine.Audio;
using System.Collections.Generic;
#if UNITY_EDITOR
namespace Microsoft.MixedReality.Toolkit.Audio
{
@ -89,7 +88,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <summary>
/// Names for the available editor types
/// </summary>
private readonly string[] editorTypeNames = { "Events", "Parameters", "Batch Edit" };
private readonly string[] editorTypeNames = { "Events", "Parameters", "Batch Edit", "Switches" };
/// <summary>
/// The color to display a button for an event that is not currently being edited
/// </summary>
@ -134,7 +133,8 @@ namespace Microsoft.MixedReality.Toolkit.Audio
{
Events,
Parameters,
BatchEdit
BatchEdit,
Switches
}
/// <summary>
@ -197,6 +197,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
newNodeMenu.AddItem(new GUIContent("Delete Event"), false, ConfirmDeleteEvent);
newNodeMenu.AddItem(new GUIContent("Preview Event"), false, PreviewEvent);
newNodeMenu.AddItem(new GUIContent("Stop Preview"), false, StopPreview);
newNodeMenu.AddItem(new GUIContent("Sort Events"), false, SortEventList);
newNodeMenu.ShowAsContext();
}
GUILayout.EndHorizontal();
@ -217,6 +218,9 @@ namespace Microsoft.MixedReality.Toolkit.Audio
case EditorTypes.Parameters:
DrawParameterList();
break;
case EditorTypes.Switches:
DrawSwitchList();
break;
case EditorTypes.BatchEdit:
DrawBatchEditor();
break;
@ -317,6 +321,46 @@ namespace Microsoft.MixedReality.Toolkit.Audio
GUILayout.EndArea();
}
private void DrawSwitchList()
{
this.parameterListRect.height = this.position.height / 2;
GUILayout.BeginArea(this.parameterListRect);
this.parameterListScrollPosition = EditorGUILayout.BeginScrollView(this.parameterListScrollPosition);
if (this.audioBank == null)
{
EditorGUILayout.EndScrollView();
GUILayout.EndArea();
return;
}
if (GUILayout.Button("Add Switch"))
{
this.audioBank.AddSwitch();
}
if (this.audioBank.EditorSwitches != null)
{
for (int i = 0; i < this.audioBank.EditorSwitches.Count; i++)
{
AudioSwitch tempSwitch = this.audioBank.EditorSwitches[i];
if (tempSwitch == null)
{
continue;
}
tempSwitch.DrawSwitchEditor();
if (GUILayout.Button("Delete Switch"))
{
this.audioBank.DeleteSwitch(tempSwitch);
}
EditorGUILayout.Separator();
}
}
EditorGUILayout.EndScrollView();
GUILayout.EndArea();
}
/// <summary>
/// Draw the interface for editing multiple AudioEvents
/// </summary>
@ -611,6 +655,14 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
private void SortEventList()
{
if (this.audioBank != null)
{
this.audioBank.SortEvents();
}
}
#region Mouse
/// <summary>
@ -801,8 +853,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
newNodeMenu.AddItem(new GUIContent("Add Random Selector"), false, AddNodeAtPosition<AudioRandomSelector>, position);
newNodeMenu.AddItem(new GUIContent("Add Sequence Selector"), false, AddNodeAtPosition<AudioSequenceSelector>, position);
newNodeMenu.AddItem(new GUIContent("Add Language Selector"), false, AddNodeAtPosition<AudioLanguageSelector>, position);
newNodeMenu.AddItem(new GUIContent("Add Switch Selector"), false, AddNodeAtPosition<AudioSwitchSelector>, position);
newNodeMenu.AddItem(new GUIContent("Add Blend Container"), false, AddNodeAtPosition<AudioBlendContainer>, position);
newNodeMenu.AddItem(new GUIContent("Add Blend File"), false, AddNodeAtPosition<AudioBlendFile>, position);
newNodeMenu.AddItem(new GUIContent("Add Snapshot Transition"), false, AddNodeAtPosition<AudioSnapshotTransition>, position);
newNodeMenu.AddItem(new GUIContent("Add Delay"), false, AddNodeAtPosition<AudioDelay>, position);
newNodeMenu.AddItem(new GUIContent("Add Debug Message"), false, AddNodeAtPosition<AudioDebugMessage>, position);
newNodeMenu.AddItem(new GUIContent("Add Null File"), false, AddNodeAtPosition<AudioNullFile>, position);
newNodeMenu.AddItem(new GUIContent("Set Output Position"), false, SetOutputPosition, position);
newNodeMenu.ShowAsContext();
}
@ -886,7 +943,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
{
AudioFile tempNode = AddNodeAtPosition<AudioFile>(tempPos);
tempNode.File = clips[i];
tempPos.y += 200;
tempPos.y += 120;
}
}
@ -1056,5 +1113,3 @@ namespace Microsoft.MixedReality.Toolkit.Audio
#endregion
}
}
#endif

Просмотреть файл

@ -6,8 +6,6 @@ using UnityEditor;
using UnityEngine.Audio;
using System.Collections.Generic;
#if UNITY_EDITOR
namespace Microsoft.MixedReality.Toolkit.Audio
{
/// <summary>
@ -35,19 +33,18 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// The vertical position of the next bus to be displayed in the window
/// </summary>
private float busY = 0;
/// <summary>
/// The horizontal position of the next event to be displayed in the window
/// </summary>
private const float eventX = 20;
private const float eventX = 220;
/// <summary>
/// The horizontal position of the next emitter to be displayed in the window
/// </summary>
private const float emitterX = 260;
private const float emitterX = eventX + 220;
/// <summary>
/// The horizontal position of the next bus to be displayed in the window
/// </summary>
private const float busX = 500;
private const float busX = emitterX + 220;
/// <summary>
/// The height of the GUI window for all nodes
/// </summary>
@ -61,6 +58,14 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private const float WindowYInterval = 120;
/// <summary>
/// Window for listing previous events
/// </summary>
private Rect eventListRect = new Rect(0, 20, 300, 400);
/// <summary>
/// The scroll position of the event list
/// </summary>
private Vector2 eventListScrollPosition = new Vector2();
/// <summary>
/// The maximum number of saved previous frames in the profiler
/// </summary>
private const int MaxFrames = 300;
@ -87,6 +92,8 @@ namespace Microsoft.MixedReality.Toolkit.Audio
private void OnGUI()
{
DrawEventList();
if (this.profilerFrames.Count > 0)
{
this.currentFrame = EditorGUILayout.IntSlider(this.currentFrame, 0, this.profilerFrames.Count - 1);
@ -112,16 +119,25 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private void CollectProfilerEvents()
{
List<ActiveEvent> activeEvents = AudioManager.GetActiveEvents();
List<ActiveEvent> activeEvents = AudioManager.ActiveEvents;
ProfilerEvent[] currentEvents = new ProfilerEvent[activeEvents.Count];
for (int i = 0; i < currentEvents.Length; i++)
{
ActiveEvent tempActiveEvent = activeEvents[i];
if (tempActiveEvent.sources.Count == 0)
{
//Debug.LogFormat("No sources for event {0}", tempActiveEvent.name);
//continue;
}
ProfilerEvent tempProfilerEvent = new ProfilerEvent();
tempProfilerEvent.eventName = tempActiveEvent.rootEvent.name;
tempProfilerEvent.clip = tempActiveEvent.source.clip;
tempProfilerEvent.emitterObject = tempActiveEvent.source.gameObject;
tempProfilerEvent.bus = tempActiveEvent.source.outputAudioMixerGroup;
tempProfilerEvent.eventName = tempActiveEvent.name;
if (tempActiveEvent.sources != null && tempActiveEvent.sources.Count > 0)
{
tempProfilerEvent.clip = tempActiveEvent.sources[0].source.clip;
tempProfilerEvent.emitterObject = tempActiveEvent.sources[0].source.gameObject;
tempProfilerEvent.bus = tempActiveEvent.rootEvent.Output.mixerGroup;
}
tempProfilerEvent.activeEvent = tempActiveEvent;
currentEvents[i] = tempProfilerEvent;
}
this.profilerFrames.Add(currentEvents);
@ -132,6 +148,22 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
private void DrawEventList()
{
this.eventListRect.height = this.position.height;
GUILayout.BeginArea(this.eventListRect);
this.eventListScrollPosition = EditorGUILayout.BeginScrollView(this.eventListScrollPosition);
for (int i = 0; i < AudioManager.PreviousEvents.Count; i++)
{
ActiveEvent tempEvent = AudioManager.PreviousEvents[i];
GUILayout.Label(tempEvent.timeStarted + " : " + tempEvent.name + " - " + tempEvent.status.ToString());
}
EditorGUILayout.EndScrollView();
GUILayout.EndArea();
}
/// <summary>
/// Draw the nodes for the specified frame
/// </summary>
@ -149,16 +181,19 @@ namespace Microsoft.MixedReality.Toolkit.Audio
{
bool addedEmitter = false;
ProfilerEvent tempEvent = profilerEvents[i];
//this.currentProfiledEvent = tempEvent;
if (tempEvent == null)
{
continue;
}
GUI.Window(i, new Rect(eventX, this.eventY, WindowWidth, WindowHeight), DrawWindow, tempEvent.eventName);
//GUI.Window(i, new Rect(eventX, this.eventY, WindowWidth, WindowHeight), DrawWindow, tempEvent.eventName);
tempEvent.activeEvent.DrawNode(i, new Rect(eventX, this.eventY, WindowWidth, WindowHeight));
if (!emitters.Contains(tempEvent.emitterObject))
{
emitters.Add(tempEvent.emitterObject);
GUI.Window(i + 200, new Rect(emitterX, this.emitterY, WindowWidth, WindowHeight), DrawWindow, tempEvent.emitterObject.name);
string emitterName = tempEvent.emitterObject == null ? "No emitter" : tempEvent.emitterObject.name;
GUI.Window(i + 200, new Rect(emitterX, this.emitterY, WindowWidth, WindowHeight), DrawWindow, emitterName);
DrawCurve(new Vector2(eventX + WindowWidth, this.eventY), new Vector2(emitterX, this.emitterY));
addedEmitter = true;
}
@ -205,6 +240,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <param name="id">Index of the window to draw</param>
private void DrawWindow(int id)
{
//EditorGUILayout.TextField("Volume:" + this.currentProfiledEvent.activeEvent.source.volume.ToString());
GUI.DragWindow();
}
@ -223,5 +259,3 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
}
#endif

Просмотреть файл

@ -27,5 +27,9 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// The audio bus the event is routed to
/// </summary>
public AudioMixerGroup bus;
/// <summary>
/// The Active Event reference for the playing sound
/// </summary>
public ActiveEvent activeEvent;
}
}

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "com.microsoft.edt.lib.audiomanager.editor",
"references": [
"GUID:60c6551998711ca4b9d346347b638d74"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Просмотреть файл

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: db208f37fcd199d4795be7bcc62cc7a3
DefaultImporter:
guid: eab1b4e90a4752a45bc67ff4328c748a
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:

Просмотреть файл

@ -1,40 +0,0 @@
{
"dependencies": {
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.2.3",
"com.unity.collab-proxy": "1.2.15",
"com.unity.package-manager-ui": "2.0.13",
"com.unity.purchasing": "2.0.3",
"com.unity.textmeshpro": "1.4.1",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}

Просмотреть файл

@ -1,17 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!11 &1
AudioManager:
m_ObjectHideFlags: 0
m_Volume: 1
Rolloff Scale: 1
Doppler Factor: 1
Default Speaker Mode: 2
m_SampleRate: 0
m_DSPBufferSize: 1024
m_VirtualVoiceCount: 512
m_RealVoiceCount: 32
m_SpatializerPlugin:
m_AmbisonicDecoderPlugin:
m_DisableAudio: 0
m_VirtualizeEffects: 1

Просмотреть файл

@ -1,6 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!236 &1
ClusterInputManager:
m_ObjectHideFlags: 0
m_Inputs: []

Просмотреть файл

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Gravity: {x: 0, y: -9.81, z: 0}
m_DefaultMaterial: {fileID: 0}
m_BounceThreshold: 2
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6
m_DefaultSolverVelocityIterations: 1
m_QueriesHitBackfaces: 0
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_ClothInterCollisionDistance: 0
m_ClothInterCollisionStiffness: 0
m_ContactsGeneration: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1
m_ClothInterCollisionSettingsToggle: 0
m_ContactPairsMode: 0
m_BroadphaseType: 0
m_WorldBounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 250, y: 250, z: 250}
m_WorldSubdivisions: 8

Просмотреть файл

@ -1,8 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1045 &1
EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
m_configObjects: {}

Просмотреть файл

@ -1,21 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!159 &1
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_LineEndingsForNewScripts: 2
m_DefaultBehaviorMode: 0
m_SpritePackerMode: 0
m_SpritePackerPaddingPower: 1
m_EtcTextureCompressorBehavior: 1
m_EtcTextureFastCompressor: 1
m_EtcTextureNormalCompressor: 2
m_EtcTextureBestCompressor: 4
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
m_ProjectGenerationRootNamespace:
m_UserGeneratedProjectSuffix:
m_CollabEditorSettings:
inProgressEnabled: 1

Просмотреть файл

@ -1,62 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!30 &1
GraphicsSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_Deferred:
m_Mode: 1
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
m_DeferredReflections:
m_Mode: 1
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
m_ScreenSpaceShadows:
m_Mode: 1
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
m_LegacyDeferred:
m_Mode: 1
m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
m_DepthNormals:
m_Mode: 1
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
m_MotionVectors:
m_Mode: 1
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
m_LightHalo:
m_Mode: 1
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
m_LensFlare:
m_Mode: 1
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
m_AlwaysIncludedShaders:
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_CustomRenderPipeline: {fileID: 0}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1
m_DefaultMobileRenderingPath: 1
m_TierSettings: []
m_LightmapStripping: 0
m_FogStripping: 0
m_InstancingStripping: 0
m_LightmapKeepPlain: 1
m_LightmapKeepDirCombined: 1
m_LightmapKeepDynamicPlain: 1
m_LightmapKeepDynamicDirCombined: 1
m_LightmapKeepShadowMask: 1
m_LightmapKeepSubtractive: 1
m_FogKeepLinear: 1
m_FogKeepExp: 1
m_FogKeepExp2: 1
m_AlbedoSwatchInfos: []
m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 0

Просмотреть файл

@ -1,295 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!13 &1
InputManager:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Axes:
- serializedVersion: 3
m_Name: Horizontal
descriptiveName:
descriptiveNegativeName:
negativeButton: left
positiveButton: right
altNegativeButton: a
altPositiveButton: d
gravity: 3
dead: 0.001
sensitivity: 3
snap: 1
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Vertical
descriptiveName:
descriptiveNegativeName:
negativeButton: down
positiveButton: up
altNegativeButton: s
altPositiveButton: w
gravity: 3
dead: 0.001
sensitivity: 3
snap: 1
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Fire1
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: left ctrl
altNegativeButton:
altPositiveButton: mouse 0
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Fire2
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: left alt
altNegativeButton:
altPositiveButton: mouse 1
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Fire3
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: left shift
altNegativeButton:
altPositiveButton: mouse 2
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Jump
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: space
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Mouse X
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 0
dead: 0
sensitivity: 0.1
snap: 0
invert: 0
type: 1
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Mouse Y
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 0
dead: 0
sensitivity: 0.1
snap: 0
invert: 0
type: 1
axis: 1
joyNum: 0
- serializedVersion: 3
m_Name: Mouse ScrollWheel
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 0
dead: 0
sensitivity: 0.1
snap: 0
invert: 0
type: 1
axis: 2
joyNum: 0
- serializedVersion: 3
m_Name: Horizontal
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 0
dead: 0.19
sensitivity: 1
snap: 0
invert: 0
type: 2
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Vertical
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 0
dead: 0.19
sensitivity: 1
snap: 0
invert: 1
type: 2
axis: 1
joyNum: 0
- serializedVersion: 3
m_Name: Fire1
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 0
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Fire2
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 1
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Fire3
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 2
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Jump
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: joystick button 3
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Submit
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: return
altNegativeButton:
altPositiveButton: joystick button 0
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Submit
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: enter
altNegativeButton:
altPositiveButton: space
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Cancel
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: escape
altNegativeButton:
altPositiveButton: joystick button 1
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0

Просмотреть файл

@ -1,91 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!126 &1
NavMeshProjectSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
areas:
- name: Walkable
cost: 1
- name: Not Walkable
cost: 1
- name: Jump
cost: 2
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
m_LastAgentTypeID: -887442657
m_Settings:
- serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.75
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_SettingNames:
- Humanoid

Просмотреть файл

@ -1,8 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!149 &1
NetworkManager:
m_ObjectHideFlags: 0
m_DebugLevel: 0
m_Sendrate: 15
m_AssetToPrefab: {}

Просмотреть файл

@ -1,38 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!19 &1
Physics2DSettings:
m_ObjectHideFlags: 0
serializedVersion: 4
m_Gravity: {x: 0, y: -9.81}
m_DefaultMaterial: {fileID: 0}
m_VelocityIterations: 8
m_PositionIterations: 3
m_VelocityThreshold: 1
m_MaxLinearCorrection: 0.2
m_MaxAngularCorrection: 8
m_MaxTranslationSpeed: 100
m_MaxRotationSpeed: 360
m_BaumgarteScale: 0.2
m_BaumgarteTimeOfImpactScale: 0.75
m_TimeToSleep: 0.5
m_LinearSleepTolerance: 0.01
m_AngularSleepTolerance: 2
m_DefaultContactOffset: 0.01
m_AutoSimulation: 1
m_QueriesHitTriggers: 1
m_QueriesStartInColliders: 1
m_ChangeStopsCallbacks: 0
m_CallbacksOnDisable: 1
m_ReuseCollisionCallbacks: 1
m_AutoSyncTransforms: 0
m_AlwaysShowColliders: 0
m_ShowColliderSleep: 1
m_ShowColliderContacts: 0
m_ShowColliderAABB: 0
m_ContactArrowScale: 0.2
m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

Просмотреть файл

@ -1,27 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1386491679 &1
PresetManager:
m_ObjectHideFlags: 0
m_DefaultList:
- type:
m_NativeTypeID: 108
m_ManagedTypePPtr: {fileID: 0}
m_ManagedTypeFallback:
defaultPresets:
- m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea,
type: 2}
- type:
m_NativeTypeID: 1020
m_ManagedTypePPtr: {fileID: 0}
m_ManagedTypeFallback:
defaultPresets:
- m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6,
type: 2}
- type:
m_NativeTypeID: 1006
m_ManagedTypePPtr: {fileID: 0}
m_ManagedTypeFallback:
defaultPresets:
- m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9,
type: 2}

Просмотреть файл

@ -1,633 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 18
productGUID: a24b608b009df89438045a5fe6cc5398
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0
AndroidEnableSustainedPerformanceMode: 0
defaultScreenOrientation: 4
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: UnityAudioManager
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
m_ShowUnitySplashScreen: 1
m_ShowUnitySplashLogo: 1
m_SplashScreenOverlayOpacity: 1
m_SplashScreenAnimation: 1
m_SplashScreenLogoStyle: 1
m_SplashScreenDrawMode: 0
m_SplashScreenBackgroundAnimationZoom: 1
m_SplashScreenLogoAnimationZoom: 1
m_SplashScreenBackgroundLandscapeAspect: 1
m_SplashScreenBackgroundPortraitAspect: 1
m_SplashScreenBackgroundLandscapeUvs:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
m_SplashScreenBackgroundPortraitUvs:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1024
defaultScreenHeight: 768
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0
m_ActiveColorSpace: 0
m_MTRendering: 1
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
iosShowActivityIndicatorOnLoading: -1
androidShowActivityIndicatorOnLoading: -1
displayResolutionDialog: 1
iosUseCustomAppBackgroundBehavior: 0
iosAllowHTTPDownload: 1
allowedAutorotateToPortrait: 1
allowedAutorotateToPortraitUpsideDown: 1
allowedAutorotateToLandscapeRight: 1
allowedAutorotateToLandscapeLeft: 1
useOSAutorotation: 1
use32BitDisplayBuffer: 1
preserveFramebufferAlpha: 0
disableDepthAndStencilBuffers: 0
androidStartInFullscreen: 1
androidRenderOutsideSafeArea: 0
androidBlitType: 0
defaultIsNativeResolution: 1
macRetinaSupport: 1
runInBackground: 1
captureSingleScreen: 0
muteOtherAudioSources: 0
Prepare IOS For Recording: 0
Force IOS Speakers When Recording: 0
deferSystemGesturesMode: 0
hideHomeButton: 0
submitAnalytics: 1
usePlayerLog: 1
bakeCollisionMeshes: 0
forceSingleInstance: 0
resizableWindow: 0
useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games
gpuSkinning: 1
graphicsJobs: 0
xboxPIXTextureCapture: 0
xboxEnableAvatar: 0
xboxEnableKinect: 0
xboxEnableKinectAutoTracking: 0
xboxEnableFitness: 0
visibleInBackground: 1
allowFullscreenSwitch: 1
graphicsJobMode: 0
fullscreenMode: 1
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0
xboxEnablePIXSampling: 0
metalFramebufferOnly: 0
xboxOneResolution: 0
xboxOneSResolution: 0
xboxOneXResolution: 3
xboxOneMonoLoggingLevel: 0
xboxOneLoggingLevel: 1
xboxOneDisableEsram: 0
xboxOneEnableTypeOptimization: 0
xboxOnePresentImmediateThreshold: 0
switchQueueCommandMemory: 0
switchQueueControlMemory: 16384
switchQueueComputeMemory: 262144
switchNVNShaderPoolsGranularity: 33554432
switchNVNDefaultPoolsGranularity: 16777216
switchNVNOtherPoolsGranularity: 16777216
vulkanEnableSetSRGBWrite: 0
m_SupportedAspectRatios:
4:3: 1
5:4: 1
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.1
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
xboxOneDisableKinectGpuReservation: 1
xboxOneEnable7thCore: 1
isWsaHolographicRemotingEnabled: 0
vrSettings:
cardboard:
depthFormat: 0
enableTransitionView: 0
daydream:
depthFormat: 0
useSustainedPerformanceMode: 0
enableVideoLayer: 0
useProtectedVideoMemory: 0
minimumSupportedHeadTracking: 0
maximumSupportedHeadTracking: 1
hololens:
depthFormat: 1
depthBufferSharingEnabled: 1
oculus:
sharedDepthBuffer: 1
dashSupport: 1
lowOverheadMode: 0
protectedContext: 0
v2Signing: 0
enable360StereoCapture: 0
protectGraphicsMemory: 0
enableFrameTimingStats: 0
useHDRDisplay: 0
m_ColorGamuts: 00000000
targetPixelDensity: 30
resolutionScalingMode: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier: {}
buildNumber: {}
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 16
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
aotOptions:
stripEngineCode: 1
iPhoneStrippingLevel: 0
iPhoneScriptCallOptimization: 0
ForceInternetPermission: 0
ForceSDCardPermission: 0
CreateWallpaper: 0
APKExpansionFiles: 0
keepLoadedShadersAlive: 0
StripUnusedMeshComponents: 1
VertexChannelCompressionMask: 4054
iPhoneSdkVersion: 988
iOSTargetOSVersionString: 9.0
tvOSSdkVersion: 0
tvOSRequireExtendedGameController: 0
tvOSTargetOSVersionString: 9.0
uIPrerenderedIcon: 0
uIRequiresPersistentWiFi: 0
uIRequiresFullScreen: 1
uIStatusBarHidden: 1
uIExitOnSuspend: 0
uIStatusBarStyle: 0
iPhoneSplashScreen: {fileID: 0}
iPhoneHighResSplashScreen: {fileID: 0}
iPhoneTallHighResSplashScreen: {fileID: 0}
iPhone47inSplashScreen: {fileID: 0}
iPhone55inPortraitSplashScreen: {fileID: 0}
iPhone55inLandscapeSplashScreen: {fileID: 0}
iPhone58inPortraitSplashScreen: {fileID: 0}
iPhone58inLandscapeSplashScreen: {fileID: 0}
iPadPortraitSplashScreen: {fileID: 0}
iPadHighResPortraitSplashScreen: {fileID: 0}
iPadLandscapeSplashScreen: {fileID: 0}
iPadHighResLandscapeSplashScreen: {fileID: 0}
appleTVSplashScreen: {fileID: 0}
appleTVSplashScreen2x: {fileID: 0}
tvOSSmallIconLayers: []
tvOSSmallIconLayers2x: []
tvOSLargeIconLayers: []
tvOSLargeIconLayers2x: []
tvOSTopShelfImageLayers: []
tvOSTopShelfImageLayers2x: []
tvOSTopShelfImageWideLayers: []
tvOSTopShelfImageWideLayers2x: []
iOSLaunchScreenType: 0
iOSLaunchScreenPortrait: {fileID: 0}
iOSLaunchScreenLandscape: {fileID: 0}
iOSLaunchScreenBackgroundColor:
serializedVersion: 2
rgba: 0
iOSLaunchScreenFillPct: 100
iOSLaunchScreenSize: 100
iOSLaunchScreenCustomXibPath:
iOSLaunchScreeniPadType: 0
iOSLaunchScreeniPadImage: {fileID: 0}
iOSLaunchScreeniPadBackgroundColor:
serializedVersion: 2
rgba: 0
iOSLaunchScreeniPadFillPct: 100
iOSLaunchScreeniPadSize: 100
iOSLaunchScreeniPadCustomXibPath:
iOSUseLaunchScreenStoryboard: 0
iOSLaunchScreenCustomStoryboardPath:
iOSDeviceRequirements: []
iOSURLSchemes: []
iOSBackgroundModes: 0
iOSMetalForceHardShadows: 0
metalEditorSupport: 1
metalAPIValidation: 1
iOSRenderExtraFrameOnPause: 0
appleDeveloperTeamID:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:
iOSManualSigningProvisioningProfileType: 0
tvOSManualSigningProvisioningProfileType: 0
appleEnableAutomaticSigning: 0
iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
templatePackageId: com.unity.template.3d@1.3.0
templateDefaultScene: Assets/Scenes/SampleScene.unity
AndroidTargetArchitectures: 5
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
AndroidKeystoreName:
AndroidKeyaliasName:
AndroidBuildApkPerCpuArchitecture: 0
AndroidTVCompatibility: 1
AndroidIsGame: 1
AndroidEnableTango: 0
androidEnableBanner: 1
androidUseLowAccuracyLocation: 0
m_AndroidBanners:
- width: 320
height: 180
banner: {fileID: 0}
androidGamepadSupportLevel: 0
resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: []
m_BuildTargetPlatformIcons: []
m_BuildTargetBatching:
- m_BuildTarget: Standalone
m_StaticBatching: 1
m_DynamicBatching: 0
- m_BuildTarget: tvOS
m_StaticBatching: 1
m_DynamicBatching: 0
- m_BuildTarget: Android
m_StaticBatching: 1
m_DynamicBatching: 0
- m_BuildTarget: iPhone
m_StaticBatching: 1
m_DynamicBatching: 0
- m_BuildTarget: WebGL
m_StaticBatching: 0
m_DynamicBatching: 0
m_BuildTargetGraphicsAPIs:
- m_BuildTarget: AndroidPlayer
m_APIs: 0b00000008000000
m_Automatic: 1
- m_BuildTarget: iOSSupport
m_APIs: 10000000
m_Automatic: 1
- m_BuildTarget: AppleTVSupport
m_APIs: 10000000
m_Automatic: 0
- m_BuildTarget: WebGLSupport
m_APIs: 0b000000
m_Automatic: 1
m_BuildTargetVRSettings:
- m_BuildTarget: Standalone
m_Enabled: 0
m_Devices:
- Oculus
- OpenVR
m_BuildTargetEnableVuforiaSettings: []
openGLRequireES31: 0
openGLRequireES31AEP: 0
m_TemplateCustomTags: {}
mobileMTRendering:
Android: 1
iPhone: 1
tvOS: 1
m_BuildTargetGroupLightmapEncodingQuality: []
m_BuildTargetGroupLightmapSettings: []
playModeTestRunnerEnabled: 0
runPlayModeTestAsEditModeTest: 0
actionOnDotNetUnhandledException: 1
enableInternalProfiler: 0
logObjCUncaughtExceptions: 1
enableCrashReportAPI: 0
cameraUsageDescription:
locationUsageDescription:
microphoneUsageDescription:
switchNetLibKey:
switchSocketMemoryPoolSize: 6144
switchSocketAllocatorPoolSize: 128
switchSocketConcurrencyLimit: 14
switchScreenResolutionBehavior: 2
switchUseCPUProfiler: 0
switchApplicationID: 0x01004b9000490000
switchNSODependencies:
switchTitleNames_0:
switchTitleNames_1:
switchTitleNames_2:
switchTitleNames_3:
switchTitleNames_4:
switchTitleNames_5:
switchTitleNames_6:
switchTitleNames_7:
switchTitleNames_8:
switchTitleNames_9:
switchTitleNames_10:
switchTitleNames_11:
switchTitleNames_12:
switchTitleNames_13:
switchTitleNames_14:
switchPublisherNames_0:
switchPublisherNames_1:
switchPublisherNames_2:
switchPublisherNames_3:
switchPublisherNames_4:
switchPublisherNames_5:
switchPublisherNames_6:
switchPublisherNames_7:
switchPublisherNames_8:
switchPublisherNames_9:
switchPublisherNames_10:
switchPublisherNames_11:
switchPublisherNames_12:
switchPublisherNames_13:
switchPublisherNames_14:
switchIcons_0: {fileID: 0}
switchIcons_1: {fileID: 0}
switchIcons_2: {fileID: 0}
switchIcons_3: {fileID: 0}
switchIcons_4: {fileID: 0}
switchIcons_5: {fileID: 0}
switchIcons_6: {fileID: 0}
switchIcons_7: {fileID: 0}
switchIcons_8: {fileID: 0}
switchIcons_9: {fileID: 0}
switchIcons_10: {fileID: 0}
switchIcons_11: {fileID: 0}
switchIcons_12: {fileID: 0}
switchIcons_13: {fileID: 0}
switchIcons_14: {fileID: 0}
switchSmallIcons_0: {fileID: 0}
switchSmallIcons_1: {fileID: 0}
switchSmallIcons_2: {fileID: 0}
switchSmallIcons_3: {fileID: 0}
switchSmallIcons_4: {fileID: 0}
switchSmallIcons_5: {fileID: 0}
switchSmallIcons_6: {fileID: 0}
switchSmallIcons_7: {fileID: 0}
switchSmallIcons_8: {fileID: 0}
switchSmallIcons_9: {fileID: 0}
switchSmallIcons_10: {fileID: 0}
switchSmallIcons_11: {fileID: 0}
switchSmallIcons_12: {fileID: 0}
switchSmallIcons_13: {fileID: 0}
switchSmallIcons_14: {fileID: 0}
switchManualHTML:
switchAccessibleURLs:
switchLegalInformation:
switchMainThreadStackSize: 1048576
switchPresenceGroupId:
switchLogoHandling: 0
switchReleaseVersion: 0
switchDisplayVersion: 1.0.0
switchStartupUserAccount: 0
switchTouchScreenUsage: 0
switchSupportedLanguagesMask: 0
switchLogoType: 0
switchApplicationErrorCodeCategory:
switchUserAccountSaveDataSize: 0
switchUserAccountSaveDataJournalSize: 0
switchApplicationAttribute: 0
switchCardSpecSize: -1
switchCardSpecClock: -1
switchRatingsMask: 0
switchRatingsInt_0: 0
switchRatingsInt_1: 0
switchRatingsInt_2: 0
switchRatingsInt_3: 0
switchRatingsInt_4: 0
switchRatingsInt_5: 0
switchRatingsInt_6: 0
switchRatingsInt_7: 0
switchRatingsInt_8: 0
switchRatingsInt_9: 0
switchRatingsInt_10: 0
switchRatingsInt_11: 0
switchRatingsInt_12: 0
switchLocalCommunicationIds_0:
switchLocalCommunicationIds_1:
switchLocalCommunicationIds_2:
switchLocalCommunicationIds_3:
switchLocalCommunicationIds_4:
switchLocalCommunicationIds_5:
switchLocalCommunicationIds_6:
switchLocalCommunicationIds_7:
switchParentalControl: 0
switchAllowsScreenshot: 1
switchAllowsVideoCapturing: 1
switchAllowsRuntimeAddOnContentInstall: 0
switchDataLossConfirmation: 0
switchUserAccountLockEnabled: 0
switchSystemResourceMemory: 16777216
switchSupportedNpadStyles: 3
switchNativeFsCacheSize: 32
switchIsHoldTypeHorizontal: 0
switchSupportedNpadCount: 8
switchSocketConfigEnabled: 0
switchTcpInitialSendBufferSize: 32
switchTcpInitialReceiveBufferSize: 64
switchTcpAutoSendBufferSizeMax: 256
switchTcpAutoReceiveBufferSizeMax: 256
switchUdpSendBufferSize: 9
switchUdpReceiveBufferSize: 42
switchSocketBufferEfficiency: 4
switchSocketInitializeEnabled: 1
switchNetworkInterfaceManagerInitializeEnabled: 1
switchPlayerConnectionEnabled: 1
ps4NPAgeRating: 12
ps4NPTitleSecret:
ps4NPTrophyPackPath:
ps4ParentalLevel: 11
ps4ContentID: ED1633-NPXX51362_00-0000000000000000
ps4Category: 0
ps4MasterVersion: 01.00
ps4AppVersion: 01.00
ps4AppType: 0
ps4ParamSfxPath:
ps4VideoOutPixelFormat: 0
ps4VideoOutInitialWidth: 1920
ps4VideoOutBaseModeInitialWidth: 1920
ps4VideoOutReprojectionRate: 60
ps4PronunciationXMLPath:
ps4PronunciationSIGPath:
ps4BackgroundImagePath:
ps4StartupImagePath:
ps4StartupImagesFolder:
ps4IconImagesFolder:
ps4SaveDataImagePath:
ps4SdkOverride:
ps4BGMPath:
ps4ShareFilePath:
ps4ShareOverlayImagePath:
ps4PrivacyGuardImagePath:
ps4NPtitleDatPath:
ps4RemotePlayKeyAssignment: -1
ps4RemotePlayKeyMappingDir:
ps4PlayTogetherPlayerCount: 0
ps4EnterButtonAssignment: 1
ps4ApplicationParam1: 0
ps4ApplicationParam2: 0
ps4ApplicationParam3: 0
ps4ApplicationParam4: 0
ps4DownloadDataSize: 0
ps4GarlicHeapSize: 2048
ps4ProGarlicHeapSize: 2560
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
ps4pnSessions: 1
ps4pnPresence: 1
ps4pnFriends: 1
ps4pnGameCustomData: 1
playerPrefsSupport: 0
enableApplicationExit: 0
resetTempFolder: 1
restrictedAudioUsageRights: 0
ps4UseResolutionFallback: 0
ps4ReprojectionSupport: 0
ps4UseAudio3dBackend: 0
ps4SocialScreenEnabled: 0
ps4ScriptOptimizationLevel: 0
ps4Audio3dVirtualSpeakerCount: 14
ps4attribCpuUsage: 0
ps4PatchPkgPath:
ps4PatchLatestPkgPath:
ps4PatchChangeinfoPath:
ps4PatchDayOne: 0
ps4attribUserManagement: 0
ps4attribMoveSupport: 0
ps4attrib3DSupport: 0
ps4attribShareSupport: 0
ps4attribExclusiveVR: 0
ps4disableAutoHideSplash: 0
ps4videoRecordingFeaturesUsed: 0
ps4contentSearchFeaturesUsed: 0
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
monoEnv:
splashScreenBackgroundSourceLandscape: {fileID: 0}
splashScreenBackgroundSourcePortrait: {fileID: 0}
spritePackerPolicy:
webGLMemorySize: 256
webGLExceptionSupport: 1
webGLNameFilesAsHashes: 0
webGLDataCaching: 1
webGLDebugSymbols: 0
webGLEmscriptenArgs:
webGLModulesDirectory:
webGLTemplate: APPLICATION:Default
webGLAnalyzeBuildSize: 0
webGLUseEmbeddedResources: 0
webGLCompressionFormat: 1
webGLLinkerTarget: 1
webGLThreadsSupport: 0
scriptingDefineSymbols: {}
platformArchitecture: {}
scriptingBackend: {}
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
allowUnsafeCode: 0
additionalIl2CppArgs:
scriptingRuntimeVersion: 1
apiCompatibilityLevelPerPlatform: {}
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: Template_3D
metroPackageVersion:
metroCertificatePath:
metroCertificatePassword:
metroCertificateSubject:
metroCertificateIssuer:
metroCertificateNotAfter: 0000000000000000
metroApplicationDescription: Template_3D
wsaImages: {}
metroTileShortName:
metroTileShowName: 0
metroMediumTileShowName: 0
metroLargeTileShowName: 0
metroWideTileShowName: 0
metroSupportStreamingInstall: 0
metroLastRequiredScene: 0
metroDefaultTileSize: 1
metroTileForegroundText: 2
metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
a: 1}
metroSplashScreenUseBackgroundColor: 0
platformCapabilities: {}
metroTargetDeviceFamilies: {}
metroFTAName:
metroFTAFileTypes: []
metroProtocolName:
metroCompilationOverrides: 1
XboxOneProductId:
XboxOneUpdateKey:
XboxOneSandboxId:
XboxOneContentId:
XboxOneTitleId:
XboxOneSCId:
XboxOneGameOsOverridePath:
XboxOnePackagingOverridePath:
XboxOneAppManifestOverridePath:
XboxOneVersion: 1.0.0.0
XboxOnePackageEncryption: 0
XboxOnePackageUpdateGranularity: 2
XboxOneDescription:
XboxOneLanguage:
- enus
XboxOneCapability: []
XboxOneGameRating: {}
XboxOneIsContentPackage: 0
XboxOneEnableGPUVariability: 1
XboxOneSockets: {}
XboxOneSplashScreen: {fileID: 0}
XboxOneAllowedProductIds: []
XboxOnePersistentLocalStorageSize: 0
XboxOneXTitleMemory: 8
xboxOneScriptCompiler: 1
XboxOneOverrideIdentityName:
vrEditorSettings:
daydream:
daydreamIconForeground: {fileID: 0}
daydreamIconBackground: {fileID: 0}
cloudServicesEnabled:
UNet: 1
luminIcon:
m_Name:
m_ModelFolderPath:
m_PortalFolderPath:
luminCert:
m_CertPath:
m_PrivateKeyPath:
luminIsChannelApp: 0
luminVersion:
m_VersionCode: 1
m_VersionName:
facebookSdkVersion: 7.9.4
facebookAppId:
facebookCookies: 1
facebookLogging: 1
facebookStatus: 1
facebookXfbml: 0
facebookFrictionlessRequests: 1
apiCompatibilityLevel: 6
cloudProjectId:
framebufferDepthMemorylessMode: 0
projectName:
organizationId:
cloudEnabled: 0
enableNativePlatformBackendsForNewInputSystem: 0
disableOldInputManagerSupport: 0
legacyClampBlendShapeWeights: 0

Просмотреть файл

@ -1 +0,0 @@
m_EditorVersion: 2018.4.23f1

Просмотреть файл

@ -1,190 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!47 &1
QualitySettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_CurrentQuality: 4
m_QualitySettings:
- serializedVersion: 2
name: Very Low
pixelLightCount: 0
shadows: 0
shadowResolution: 0
shadowProjection: 1
shadowCascades: 1
shadowDistance: 15
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 1
textureQuality: 1
anisotropicTextures: 0
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0
vSyncCount: 0
lodBias: 0.3
maximumLODLevel: 0
particleRaycastBudget: 4
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 16
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Low
pixelLightCount: 0
shadows: 0
shadowResolution: 0
shadowProjection: 1
shadowCascades: 1
shadowDistance: 20
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
textureQuality: 0
anisotropicTextures: 0
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0
vSyncCount: 0
lodBias: 0.4
maximumLODLevel: 0
particleRaycastBudget: 16
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 16
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Medium
pixelLightCount: 1
shadows: 1
shadowResolution: 0
shadowProjection: 1
shadowCascades: 1
shadowDistance: 20
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0
vSyncCount: 1
lodBias: 0.7
maximumLODLevel: 0
particleRaycastBudget: 64
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 16
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: High
pixelLightCount: 2
shadows: 2
shadowResolution: 1
shadowProjection: 1
shadowCascades: 2
shadowDistance: 40
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 2
softParticles: 0
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
vSyncCount: 1
lodBias: 1
maximumLODLevel: 0
particleRaycastBudget: 256
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 16
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Very High
pixelLightCount: 3
shadows: 2
shadowResolution: 2
shadowProjection: 1
shadowCascades: 2
shadowDistance: 40
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 4
softParticles: 1
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
vSyncCount: 1
lodBias: 1.5
maximumLODLevel: 0
particleRaycastBudget: 1024
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 16
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
- serializedVersion: 2
name: Ultra
pixelLightCount: 4
shadows: 2
shadowResolution: 2
shadowProjection: 1
shadowCascades: 4
shadowDistance: 150
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 4
softParticles: 1
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
vSyncCount: 1
lodBias: 2
maximumLODLevel: 0
particleRaycastBudget: 4096
asyncUploadTimeSlice: 2
asyncUploadBufferSize: 16
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2
Nintendo 3DS: 5
Nintendo Switch: 5
PS4: 5
PSP2: 2
Standalone: 5
Tizen: 2
WebGL: 3
WiiU: 5
Windows Store Apps: 5
XboxOne: 5
iPhone: 2
tvOS: 2

Просмотреть файл

@ -1,43 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!78 &1
TagManager:
serializedVersion: 2
tags: []
layers:
- Default
- TransparentFX
- Ignore Raycast
-
- Water
- UI
-
-
- PostProcessing
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
m_SortingLayers:
- name: Default
uniqueID: 0
locked: 0

Просмотреть файл

@ -1,9 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!5 &1
TimeManager:
m_ObjectHideFlags: 0
Fixed Timestep: 0.02
Maximum Allowed Timestep: 0.1
m_TimeScale: 1
Maximum Particle Timestep: 0.03

Просмотреть файл

@ -1,34 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!310 &1
UnityConnectSettings:
m_ObjectHideFlags: 0
serializedVersion: 1
m_Enabled: 0
m_TestMode: 0
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
m_ConfigUrl: https://config.uca.cloud.unity3d.com
m_TestInitMode: 0
CrashReportingSettings:
m_EventUrl: https://perf-events.cloud.unity3d.com
m_Enabled: 0
m_LogBufferSize: 10
m_CaptureEditorExceptions: 1
UnityPurchasingSettings:
m_Enabled: 0
m_TestMode: 0
UnityAnalyticsSettings:
m_Enabled: 0
m_TestMode: 0
m_InitializeOnStartup: 1
UnityAdsSettings:
m_Enabled: 0
m_InitializeOnStartup: 1
m_TestMode: 0
m_IosGameId:
m_AndroidGameId:
m_GameIds: {}
m_GameId:
PerformanceReportingSettings:
m_Enabled: 0

Просмотреть файл

@ -1,11 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!937362698 &1
VFXManager:
m_ObjectHideFlags: 0
m_IndirectShader: {fileID: 0}
m_CopyBufferShader: {fileID: 0}
m_SortShader: {fileID: 0}
m_RenderPipeSettingsPath:
m_FixedTimeStep: 0.016666668
m_MaxDeltaTime: 0.05

Просмотреть файл

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fb43ba78ec5f75b47ba922a20f60ae54
guid: 5a51bb11551bdf846be32eae43f98986
folderAsset: yes
DefaultImporter:
externalObjects: {}

Просмотреть файл

@ -1,27 +1,51 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Microsoft.MixedReality.Toolkit.Audio
{
/// <summary>
/// The runtime event of an Audio Event that is currently playing
/// </summary>
[System.Serializable]
public class ActiveEvent
{
/// <summary>
/// The name of the audio event to be played
/// </summary>
public string name = "";
/// <summary>
/// The AudioEvent that is being played
/// </summary>
public AudioEvent rootEvent { get; private set; }
/// <summary>
/// The AudioSource to play the AudioEvent on
/// </summary>
public AudioSource source { get; private set; }
public List<EventSource> sources { get; private set; } = new List<EventSource>();
/// <summary>
/// The AudioClip to play from the event
/// The latest status of the event
/// </summary>
public AudioClip clip;
public EventStatus status = EventStatus.Initialized;
/// <summary>
/// The AudioParameters in use by the event
/// </summary>
private ActiveParameter[] activeParameters;
public string timeStarted = "";
/// <summary>
/// The Transform to use to calculate the user's gaze position
/// </summary>
private Transform gazeReference;
/// <summary>
/// The transform that the sound should follow in the scene
/// </summary>
internal Transform emitterTransform = null;
/// <summary>
/// The text associated with the event, usually for subtitles
/// </summary>
@ -43,10 +67,6 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private float eventPitch = 1;
/// <summary>
/// The amount of time in seconds that the event has been active
/// </summary>
private float elapsedTime = 0;
/// <summary>
/// The amount of time in seconds that the event will fade in or out
/// </summary>
private float targetFadeTime = 0;
@ -55,9 +75,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private float currentFadeTime = 0;
/// <summary>
/// The amount of time in seconds since the event started
/// </summary>
private float elapsedTime = 0;
/// <summary>
/// The previous volume the event was at before starting a fade
/// </summary>
private float originVolume = 0;
private float fadeOriginVolume = 0;
/// <summary>
/// Whether the event is currently fading out to be stopped
/// </summary>
@ -67,22 +91,12 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private bool hasPlayed = false;
/// <summary>
/// Added to catch a case on the end of playback where Unity resets source.time = 0
/// </summary>
private bool hasTimeAdvanced = false;
/// <summary>
/// Whether the event is using the user's gaze for a parameter
/// </summary>
private bool useGaze = false;
/// <summary>
/// The AudioParameters in use by the event
/// </summary>
private ActiveParameter[] activeParameters;
/// <summary>
/// The Transform to use to calculate the user's gaze position
/// </summary>
private Transform gazeReference;
private bool callbackActivated = false;
private bool hasTimeAdvanced = false;
internal bool hasSnapshotTransition = false;
/// <summary>
/// The time left on the event unless it is stopped or the pitch changes
@ -91,11 +105,11 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <summary>
/// Whether the event has been muted
/// </summary>
public bool Muted { get; private set; }
public bool Muted { get; private set; } = false;
/// <summary>
/// Whether the event has been soloed
/// </summary>
public bool Soloed { get; private set; }
public bool Soloed { get; private set; } = false;
/// <summary>
/// Delegate for event completion callback
@ -112,17 +126,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
/// <param name="eventToPlay">The AudioEvent to play</param>
/// <param name="source">The AudioSource use for the AudioEvent</param>
public ActiveEvent(AudioEvent eventToPlay, AudioSource source)
public ActiveEvent(AudioEvent eventToPlay, Transform emitterTransform)
{
this.rootEvent = eventToPlay;
this.source = source;
this.Soloed = false;
this.Muted = false;
this.activeParameters = new ActiveParameter[this.rootEvent.Parameters.Count];
for (int i = 0; i < this.activeParameters.Length; i++)
{
this.activeParameters[i] = new ActiveParameter(this.rootEvent.Parameters[i]);
}
this.name = eventToPlay.name;
this.emitterTransform = emitterTransform;
InitializeParameters();
}
/// <summary>
@ -130,46 +140,22 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
public void Play()
{
this.timeStarted = Time.time.ToString();
this.rootEvent.SetActiveEventProperties(this);
if (this.clip == null)
if (this.sources.Count == 0 && !this.hasSnapshotTransition)
{
Debug.LogFormat("Audio event \"{0}\" has no audio clip!", this.rootEvent.name);
this.status = EventStatus.Error;
AudioManager.AddPreviousEvent(this);
return;
}
if (this.rootEvent.FadeIn > 0)
{
this.source.volume = 0;
this.eventVolume = 0;
this.originVolume = 0;
this.currentFadeTime = 0;
this.targetFadeTime = this.rootEvent.FadeIn;
}
else
{
this.source.volume = this.targetVolume;
this.eventVolume = this.targetVolume;
}
SetStartingSourceProperties();
this.source.pitch = this.eventPitch;
this.source.clip = this.clip;
this.EstimatedRemainingTime = this.clip.length / this.eventPitch;
if (this.initialDelay == 0)
{
this.hasPlayed = true;
this.source.Play();
}
this.status = EventStatus.Played;
this.useGaze = HasGazeProperty();
if (this.useGaze)
{
this.gazeReference = Camera.main.transform;
UpdateGaze();
}
else
{
ApplyParameters();
}
AudioManager.ActiveEvents.Add(this);
AudioManager.AddPreviousEvent(this);
}
/// <summary>
@ -177,23 +163,24 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
public void Update()
{
if (this.source == null)
if (this.rootEvent == null)
{
Debug.LogWarningFormat(this.emitterTransform, "AudioManager: Can't find audio event for {0}!", this.name);
StopImmediate();
return;
}
if (!this.hasTimeAdvanced && this.source.time > 0)
{
this.hasTimeAdvanced = true;
}
this.elapsedTime += Time.deltaTime;
if (!this.hasPlayed && this.elapsedTime >= this.initialDelay)
{
this.hasPlayed = true;
this.source.Play();
PlayAllSources();
}
if (this.emitterTransform != null)
{
SetAllSourcePositions(this.emitterTransform.position);
}
if (this.hasPlayed && this.currentFadeTime < this.targetFadeTime)
@ -201,10 +188,10 @@ namespace Microsoft.MixedReality.Toolkit.Audio
UpdateFade();
}
if (!this.source.loop)
if (!this.rootEvent.Output.loop)
{
UpdateRemainingTime();
if (this.hasPlayed && !this.source.isPlaying)
if (this.hasPlayed && !IsAnySourcePlaying())
{
StopImmediate();
}
@ -224,15 +211,14 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
public void Stop()
{
//Debug.LogFormat("{0}: Stopping {1}", Time.time, this.rootEvent.name);
if (this.rootEvent.FadeOut <= 0 || this.source == null)
if (this.rootEvent.FadeOut <= 0)
{
StopImmediate();
}
else
{
this.targetVolume = 0;
this.originVolume = this.source.volume;
this.fadeOriginVolume = this.sources[0].source.volume;
this.targetFadeTime = this.rootEvent.FadeOut;
this.currentFadeTime = 0;
this.fadeStopQueued = true;
@ -250,12 +236,11 @@ namespace Microsoft.MixedReality.Toolkit.Audio
CompletionCallback();
}
if (this.source != null)
{
this.source.Stop();
}
this.status = EventStatus.Stopped;
AudioManager.RemoveActiveEvent(this);
StopAllSources();
AudioManager.DelayRemoveActiveEvent(this);
}
/// <summary>
@ -282,6 +267,35 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
public bool AddEventSource(AudioClip clip, AudioParameter parameter = null, AnimationCurve responseCurve = null, float startTime = 0)
{
if (this.rootEvent == null)
{
Debug.LogWarningFormat(this.emitterTransform, "AudioManager: Can't find audio event for {0}!", this.name);
StopImmediate();
return false;
}
EventSource newSource = new EventSource();
newSource.source = AudioManager.GetUnusedSource();
if (newSource.source == null)
{
Debug.LogWarningFormat(this.emitterTransform, "AudioManager: Can't find unused audio source for event {0}!", this.name);
StopImmediate();
return false;
}
newSource.source.loop = this.rootEvent.Output.loop;
newSource.source.clip = clip;
newSource.parameter = parameter;
newSource.responseCurve = responseCurve;
newSource.startTime = startTime;
sources.Add(newSource);
return true;
}
/// <summary>
/// Internal AudioManager use: initializes the volume based on the event's AudioOutput
/// </summary>
@ -306,6 +320,12 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <param name="newPitch">Pitch value between -1 and 3</param>
public void SetPitch(float newPitch)
{
if (newPitch <= 0)
{
Debug.LogWarningFormat("Invalid pitch set in event {0}", this.rootEvent.name);
return;
}
this.eventPitch = newPitch;
}
@ -318,8 +338,128 @@ namespace Microsoft.MixedReality.Toolkit.Audio
this.eventPitch += pitchDelta;
}
public void SetEmitterPosition(Vector3 newPos)
{
if (this.sources.Count > 0)
{
this.sources[0].source.transform.position = newPos;
}
else
{
Debug.LogWarningFormat(this.emitterTransform, "No audio emitter for active event {0}", this.name);
}
}
#region Source Property Settings
private void SetStartingSourceProperties()
{
if (this.rootEvent.FadeIn > 0)
{
SetallSourceVolumes(0);
this.eventVolume = 0;
this.fadeOriginVolume = 0;
this.currentFadeTime = 0;
this.targetFadeTime = this.rootEvent.FadeIn;
}
else
{
SetallSourceVolumes(this.targetVolume);
this.eventVolume = this.targetVolume;
}
SetAllSourcePitches(this.eventPitch);
this.useGaze = HasGazeProperty();
if (this.useGaze)
{
this.gazeReference = Camera.main.transform;
UpdateGaze();
}
ApplyParameters();
if (this.initialDelay == 0)
{
this.hasPlayed = true;
PlayAllSources();
}
}
private void SetallSourceVolumes(float newVolume)
{
for (int i = 0; i < this.sources.Count; i++)
{
this.sources[i].source.volume = newVolume;
}
}
private void SetAllSourcePitches(float newPitch)
{
for (int i = 0; i < this.sources.Count; i++)
{
this.sources[i].source.pitch = newPitch;
}
}
private void PlayAllSources()
{
for (int i = 0; i < this.sources.Count; i++)
{
this.sources[i].source.Play();
this.sources[i].source.time = this.sources[i].startTime;
}
}
private void StopAllSources()
{
for (int i = 0; i < this.sources.Count; i++)
{
EventSource tempSource = this.sources[i];
if (tempSource != null && tempSource.source != null)
{
tempSource.source.Stop();
}
}
}
public void SetAllSourcePositions(Vector3 position)
{
for (int i = 0; i < this.sources.Count; i++)
{
this.sources[i].source.transform.position = position;
}
}
private bool IsAnySourcePlaying()
{
for (int i = 0; i < this.sources.Count; i++)
{
if (this.sources[i].source.isPlaying)
{
return true;
}
}
return false;
}
#endregion
#region Private Functions
private void InitializeParameters()
{
this.activeParameters = new ActiveParameter[this.rootEvent.Parameters.Count];
for (int i = 0; i < this.activeParameters.Length; i++)
{
if (this.rootEvent.Parameters[i] != null)
{
this.activeParameters[i] = new ActiveParameter(this.rootEvent.Parameters[i]);
}
}
}
/// <summary>
/// Internal AudioManager use: Sync changes to the parameters on all ActiveEvents
/// </summary>
@ -328,6 +468,11 @@ namespace Microsoft.MixedReality.Toolkit.Audio
for (int i = 0; i < this.activeParameters.Length; i++)
{
AudioEventParameter tempParam = this.activeParameters[i].rootParameter;
if (tempParam == null || tempParam.parameter == null)
{
continue;
}
if (tempParam.CurrentValue != tempParam.parameter.CurrentValue)
{
tempParam.SyncParameter();
@ -356,8 +501,17 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
this.source.volume = tempVolume;
this.source.pitch = tempPitch;
for (int i = 0; i < this.sources.Count; i++)
{
EventSource tempSource = this.sources[i];
tempSource.source.volume = tempVolume;
tempSource.source.pitch = tempPitch;
if (tempSource.parameter != null)
{
float volumeScale = tempSource.responseCurve.Evaluate(tempSource.parameter.CurrentValue);
tempSource.source.volume = this.eventVolume * volumeScale;
}
}
}
/// <summary>
@ -367,13 +521,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
{
float percentageFaded = (this.currentFadeTime / this.targetFadeTime);
if (this.targetVolume > this.originVolume)
if (this.targetVolume > this.fadeOriginVolume)
{
this.eventVolume = this.originVolume + ((this.targetVolume - this.originVolume) * percentageFaded);
this.eventVolume = this.fadeOriginVolume + ((this.targetVolume - this.fadeOriginVolume) * percentageFaded);
}
else
{
this.eventVolume = this.originVolume - ((this.originVolume - this.targetVolume) * percentageFaded);
this.eventVolume = this.fadeOriginVolume - ((this.fadeOriginVolume - this.targetVolume) * percentageFaded);
}
this.currentFadeTime += Time.deltaTime;
@ -388,7 +542,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
this.source.volume = this.eventVolume;
SetallSourceVolumes(this.eventVolume);
}
/// <summary>
@ -396,9 +550,30 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private void UpdateRemainingTime()
{
this.EstimatedRemainingTime = (this.source.clip.length - this.source.time) / this.source.pitch;
if (this.rootEvent == null)
{
Debug.LogWarningFormat(this.emitterTransform, "AudioManager: Can't find audio event for {0}!", this.name);
StopImmediate();
return;
}
if (this.hasTimeAdvanced && this.source.time == 0)
AudioSource mainSource = this.sources[0].source;
if (mainSource == null || mainSource.clip == null || mainSource.clip.length <= 0)
{
StopImmediate();
return;
}
if (this.rootEvent.Output.loop)
{
this.EstimatedRemainingTime = 500;
}
else
{
this.EstimatedRemainingTime = (mainSource.clip.length - mainSource.time) / mainSource.pitch;
}
if (this.hasTimeAdvanced && mainSource.time == 0)
{
StopImmediate();
}
@ -418,6 +593,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
for (int i = 0; i < this.rootEvent.Parameters.Count; i++)
{
AudioParameter tempParam = this.rootEvent.Parameters[i].parameter;
if (tempParam == null)
{
Debug.LogWarningFormat("Audio event '{0}' has a null parameter!", this.rootEvent.name);
continue;
}
if (tempParam.UseGaze)
{
return true;
@ -432,13 +614,14 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private void UpdateGaze()
{
AudioSource mainSource = this.sources[0].source;
float gazeAngle = 0;
if (this.gazeReference == null)
{
this.gazeReference = Camera.main.transform;
}
Vector3 posDelta = this.gazeReference.position - this.source.transform.position;
Vector3 posDelta = this.gazeReference.position - mainSource.transform.position;
gazeAngle = Mathf.Abs(180 - Vector3.Angle(this.gazeReference.forward, posDelta));
for (int i = 0; i < this.activeParameters.Length; i++)
@ -482,8 +665,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
public void ToggleMute()
{
this.Muted = !this.Muted;
this.source.mute = this.Muted;
SetMute(!this.Muted);
}
/// <summary>
@ -493,7 +675,10 @@ namespace Microsoft.MixedReality.Toolkit.Audio
public void SetMute(bool toggle)
{
this.Muted = toggle;
this.source.mute = this.Muted;
for (int i = 0; i < this.sources.Count; i++)
{
this.sources[i].source.mute = toggle;
}
}
/// <summary>
@ -520,7 +705,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
public void ApplySolo()
{
this.source.mute = !this.Soloed;
SetMute(!this.Soloed);
}
/// <summary>
@ -529,9 +714,56 @@ namespace Microsoft.MixedReality.Toolkit.Audio
public void ClearSolo()
{
this.Soloed = false;
this.source.mute = this.Muted;
SetMute(this.Muted);
}
#endregion
#if UNITY_EDITOR
public void DisplayProperties()
{
if (this.sources.Count == 0 || this.sources[0] == null || this.sources[0].source == null)
{
return;
}
if (emitterTransform != null)
{
EditorGUILayout.LabelField("Emitter:" + emitterTransform.gameObject.name);
}
else
{
EditorGUILayout.LabelField("Emitter:" + this.sources[0].source.gameObject.name);
}
}
protected void DrawWindow(int id)
{
GUI.DragWindow();
DisplayProperties();
}
public virtual void DrawNode(int id, Rect window)
{
GUI.Window(id, window, DrawWindow, this.name);
}
#endif
#endregion
}
public class EventSource
{
public AudioSource source = new AudioSource();
public AudioParameter parameter = null;
public AnimationCurve responseCurve = null;
public float startTime = 0;
}
public enum EventStatus
{
Initialized,
Played,
Stopped,
Error
}
}

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -26,6 +26,9 @@ namespace Microsoft.MixedReality.Toolkit.Audio
[SerializeField]
private List<AudioParameter> parameters = new List<AudioParameter>();
[SerializeField]
private List<AudioSwitch> switches = new List<AudioSwitch>();
/// <summary>
/// The public accessor for the events in the bank
/// </summary>
@ -61,6 +64,11 @@ namespace Microsoft.MixedReality.Toolkit.Audio
get { return this.parameters; }
}
public List<AudioSwitch> EditorSwitches
{
get { return this.switches; }
}
/// <summary>
/// EDITOR: Create a new event and add it to the array of events in the bank
/// </summary>
@ -115,6 +123,28 @@ namespace Microsoft.MixedReality.Toolkit.Audio
ScriptableObject.DestroyImmediate(parameterToDelete, true);
}
public AudioSwitch AddSwitch()
{
AudioSwitch newSwitch = ScriptableObject.CreateInstance<AudioSwitch>();
newSwitch.name = "New Audio Switch";
newSwitch.InitializeSwitch();
AssetDatabase.AddObjectToAsset(newSwitch, this);
this.switches.Add(newSwitch);
EditorUtility.SetDirty(this);
AssetDatabase.SaveAssets();
return newSwitch;
}
public void DeleteSwitch(AudioSwitch switchToDelete)
{
this.switches.Remove(switchToDelete);
ScriptableObject.DestroyImmediate(switchToDelete, true);
}
public void SortEvents()
{
this.audioEvents.Sort(new AudioEventComparer());
}
#endif
}
}

Просмотреть файл

Просмотреть файл

@ -0,0 +1,49 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Microsoft.MixedReality.Toolkit.Audio
{
public class AudioBlendContainer : AudioNode
{
/// <summary>
/// Randomly select a connected node
/// </summary>
/// <param name="activeEvent">The existing runtime audio event</param>
public override void ProcessNode(ActiveEvent activeEvent)
{
if (this.input.ConnectedNodes == null || this.input.ConnectedNodes.Length == 0)
{
Debug.LogWarningFormat("No connected nodes for {0}", this.name);
return;
}
for (int i = 0; i < this.input.ConnectedNodes.Length; i++)
{
ProcessConnectedNode(i, activeEvent);
}
}
#if UNITY_EDITOR
/// <summary>
/// EDITOR: Set the initial values for the node's properties
/// </summary>
/// <param name="position">The position of the node on the graph</param>
public override void InitializeNode(Vector2 position)
{
this.name = "Blend Container";
this.nodeRect.height = 50;
this.nodeRect.width = 150;
this.nodeRect.position = position;
AddInput();
AddOutput();
}
#endif
}
}

Просмотреть файл

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: da600e0031fc1c44eba2e58a94541e97
guid: b0ff48ff47e3dbd44b049486f647913c
MonoImporter:
externalObjects: {}
serializedVersion: 2

116
Runtime/AudioBlendFile.cs Normal file
Просмотреть файл

@ -0,0 +1,116 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Microsoft.MixedReality.Toolkit.Audio
{
public class AudioBlendFile : AudioNode
{
/// <summary>
/// The audio clip to be set on the AudioSource if this node is processed
/// </summary>
[SerializeField]
private AudioClip file = null;
[SerializeField]
private AudioParameter parameter = null;
[SerializeField]
private AnimationCurve responseCurve = new AnimationCurve();
/// <summary>
/// The minimum start position of the node
/// </summary>
[Range(0, 1)]
public float minStartTime = 0;
/// <summary>
/// The maximum start position of the node
/// </summary>
[Range(0, 1)]
public float maxStartTime = 0;
/// <summary>
/// The Start time for the audio file to stay playing at
/// </summary>
public float startTime { get; private set; }
/// <summary>
/// Apply all modifications to the ActiveEvent before it gets played
/// </summary>
/// <param name="activeEvent">The runtime event being prepared for playback</param>
public override void ProcessNode(ActiveEvent activeEvent)
{
if (this.file == null)
{
Debug.LogWarningFormat("No file in node {0}", this.name);
return;
}
RandomStartTime();
activeEvent.AddEventSource(this.file, this.parameter, this.responseCurve, this.startTime);
}
/// <summary>
/// If the min and max start time are not the same, then generate a random value between min and max start time.
/// </summary>
/// <returns></returns>
public void RandomStartTime()
{
if (this.minStartTime != this.maxStartTime)
{
this.startTime = UnityEngine.Random.Range(minStartTime, maxStartTime);
}
else
{
this.startTime = minStartTime;
}
this.startTime = file.length * startTime;
}
#if UNITY_EDITOR
public AudioClip File
{
get { return this.file; }
set { this.file = value; }
}
/// <summary>
/// The width in pixels for the node's window in the graph
/// </summary>
private const float NodeWidth = 300;
private const float NodeHeight = 110;
/// <summary>
/// EDITOR: Initialize the node's properties when it is first created
/// </summary>
/// <param name="position">The position of the new node in the graph</param>
public override void InitializeNode(Vector2 position)
{
this.name = "Blend File";
this.nodeRect.position = position;
this.nodeRect.width = NodeWidth;
this.nodeRect.height = NodeHeight;
AddOutput();
EditorUtility.SetDirty(this);
}
/// <summary>
/// EDITOR: Display the node's properties in the graph
/// </summary>
protected override void DrawProperties()
{
this.file = EditorGUILayout.ObjectField(this.file, typeof(AudioClip), false) as AudioClip;
if (this.file != null && this.name != this.file.name)
{
this.name = this.file.name;
}
this.parameter = EditorGUILayout.ObjectField(this.parameter, typeof(AudioParameter), false) as AudioParameter;
this.responseCurve = EditorGUILayout.CurveField("Blend Curve", this.responseCurve);
EditorGUILayout.MinMaxSlider("Start Time", ref this.minStartTime, ref this.maxStartTime, 0, 1);
}
#endif
}
}

Просмотреть файл

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7dc155598a1eb0249b8a6c2db878956d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -25,7 +25,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <param name="activeEvent"></param>
public override void ProcessNode(ActiveEvent activeEvent)
{
Debug.Log(this.message, activeEvent.source);
Debug.Log(this.message, activeEvent.emitterTransform);
ProcessConnectedNode(0, activeEvent);
}

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -75,6 +75,33 @@ namespace Microsoft.MixedReality.Toolkit.Audio
set { group = value; }
}
public bool ValidateAudioFiles()
{
for (int i = 0; i < this.nodes.Count; i++)
{
AudioFile tempNode = this.nodes[i] as AudioFile;
if (tempNode != null)
{
if (tempNode.File != null)
{
if (tempNode.File.length <= 0)
{
Debug.LogErrorFormat("Invalid clip length in node {0}, event: {1}", tempNode.name, this.name);
return false;
}
}
else
{
Debug.LogErrorFormat("Null clip in node {0}, event: {1}", tempNode.name, this.name);
return false;
}
}
}
return true;
}
/// <summary>
/// Internal AudioManager use: play the event using a pre-existing ActiveEvent
/// </summary>
@ -270,18 +297,26 @@ namespace Microsoft.MixedReality.Toolkit.Audio
public List<AudioEventParameter> Parameters
{
get
{
if (this.parameters == null)
{
return new List<AudioEventParameter>();
}
else
{
return this.parameters;
}
}
}
#endregion
}
public sealed class AudioEventComparer : IComparer<AudioEvent>
{
public int Compare(AudioEvent x, AudioEvent y)
{
if (object.ReferenceEquals(x, y))
return 0;
else if (x == null)
return -1;
else if (y == null)
return -1;
else
return string.Compare(x.name, y.name);
}
}
}

Просмотреть файл

135
Runtime/AudioEventRouter.cs Normal file
Просмотреть файл

@ -0,0 +1,135 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Microsoft.MixedReality.Toolkit.Audio;
public class AudioEventRouter : MonoBehaviour
{
public AudioTrigger[] triggers;
private List<ActiveEvent> activeOnEnabledEvents = new List<ActiveEvent>();
private const float MIN_LOOP_TIME = 1.0f;
private const float MAX_LOOP_TIME = 1000.0f;
public void OnEnable()
{
for (int i = 0; i < this.triggers.Length; i++)
{
AudioTrigger tempTrigger = this.triggers[i];
if (tempTrigger.triggerOnEvent == UnityTrigger.OnEnable)
{
if (tempTrigger.loopTrigger)
{
StartLoopingTrigger(i);
}
else
{
this.activeOnEnabledEvents.Add(PlayTraceableTrigger(i));
}
}
}
}
public void OnDisable()
{
for (int i = 0; i < this.triggers.Length; i++)
{
AudioTrigger tempTrigger = this.triggers[i];
if (tempTrigger.triggerOnEvent == UnityTrigger.OnDisable)
{
PlayAudioTrigger(i);
}
StopEnabledEvents();
}
}
public void PlayAudioEvent(AudioEvent eventToPlay)
{
AudioManager.PlayEvent(eventToPlay, this.gameObject);
}
public void PlayAudioTrigger(int triggerNum)
{
PlayTraceableTrigger(triggerNum);
}
public void StartLoopingTrigger(int triggerNum)
{
StartCoroutine(PlayLoopingTrigger(triggerNum));
}
public void StopEvents(AudioEvent eventToStop)
{
AudioManager.StopAll(eventToStop);
}
public void StopEvents(int groupNumber)
{
AudioManager.StopAll(groupNumber);
}
public void StopEnabledEvents()
{
for (int i = 0; i < this.activeOnEnabledEvents.Count; i++)
{
ActiveEvent tempEvent = this.activeOnEnabledEvents[i];
if (tempEvent != null)
{
tempEvent.Stop();
}
}
this.activeOnEnabledEvents.Clear();
}
private ActiveEvent PlayTraceableTrigger(int triggerNum)
{
AudioTrigger tempTrigger = triggers[triggerNum];
if (!tempTrigger.usePosition && tempTrigger.soundEmitter == null)
{
return AudioManager.PlayEvent(tempTrigger.eventToTrigger, this.gameObject);
}
else if (tempTrigger.usePosition)
{
return AudioManager.PlayEvent(tempTrigger.eventToTrigger, tempTrigger.soundPosition);
}
else
{
return AudioManager.PlayEvent(tempTrigger.eventToTrigger, tempTrigger.soundEmitter);
}
}
private IEnumerator PlayLoopingTrigger(int triggerNum)
{
AudioTrigger loopTrigger = triggers[triggerNum];
loopTrigger.loopTimeMin = Mathf.Clamp(loopTrigger.loopTimeMin, MIN_LOOP_TIME, MAX_LOOP_TIME);
loopTrigger.loopTimeMax = Mathf.Clamp(loopTrigger.loopTimeMax, MIN_LOOP_TIME, MAX_LOOP_TIME);
while (this.enabled)
{
PlayAudioTrigger(triggerNum);
float timeUntilNextLoop = Random.Range(loopTrigger.loopTimeMin, loopTrigger.loopTimeMax);
yield return new WaitForSeconds(timeUntilNextLoop);
}
}
}
[System.Serializable]
public class AudioTrigger
{
public AudioEvent eventToTrigger = null;
public bool usePosition = false;
public Vector3 soundPosition = Vector3.zero;
public GameObject soundEmitter = null;
public UnityTrigger triggerOnEvent = UnityTrigger.None;
public bool loopTrigger = false;
public float loopTimeMin = 0f;
public float loopTimeMax = 0f;
}
public enum UnityTrigger
{
None,
OnEnable,
OnDisable,
OnSliderUpdate
}

Просмотреть файл

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 486d0524fdbbb1546bb889ca3f4fd2fd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Просмотреть файл

@ -2,6 +2,7 @@
// Licensed under the MIT License.
using UnityEngine;
using System;
#if UNITY_EDITOR
using UnityEditor;
#endif
@ -18,6 +19,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
[SerializeField]
private AudioClip file = null;
public AudioClip File
{
get { return this.file; }
set { this.file = value; }
}
/// <summary>
/// The amount of volume change to apply if this node is processed
/// </summary>
@ -28,6 +36,20 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
[SerializeField, Range(-1, 1)]
private float pitchOffset = 0;
/// <summary>
/// The minimum start position of the node
/// </summary>
[Range(0, 1)]
public float minStartTime = 0;
/// <summary>
/// The maximum start position of the node
/// </summary>
[Range(0, 1)]
public float maxStartTime = 0;
/// <summary>
/// The Start time for the audio file to stay playing at
/// </summary>
public float startTime { get; private set; }
/// <summary>
/// Apply all modifications to the ActiveEvent before it gets played
@ -37,27 +59,46 @@ namespace Microsoft.MixedReality.Toolkit.Audio
{
if (this.file == null)
{
Debug.LogWarningFormat("No file in node {0}", this.name);
Debug.LogWarningFormat("No file in node {0}, Event: {1}", this.name, activeEvent.rootEvent.name);
return;
}
else if (this.file.length <= 0)
{
Debug.LogWarningFormat("Invalid file length for node {0}, Event: {1}", this.name, activeEvent.rootEvent.name);
return;
}
activeEvent.ModulateVolume(this.volumeOffset);
activeEvent.ModulatePitch(this.pitchOffset);
activeEvent.clip = this.file;
RandomStartTime();
activeEvent.AddEventSource(this.file, null, null, startTime);
}
/// <summary>
/// If the min and max start time are not the same, then generate a random value between min and max start time.
/// </summary>
/// <returns></returns>
public void RandomStartTime()
{
if (minStartTime != maxStartTime)
{
startTime = UnityEngine.Random.Range(minStartTime, maxStartTime);
}
else
{
startTime = minStartTime;
}
startTime = file.length * startTime;
}
#if UNITY_EDITOR
public AudioClip File
{
get { return this.file; }
set { this.file = value; }
}
/// <summary>
/// The width in pixels for the node's window in the graph
/// </summary>
private const float NodeWidth = 300;
private const float NodeHeight = 110;
/// <summary>
/// EDITOR: Initialize the node's properties when it is first created
@ -68,6 +109,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
this.name = "Audio File";
this.nodeRect.position = position;
this.nodeRect.width = NodeWidth;
this.nodeRect.height = NodeHeight;
AddOutput();
EditorUtility.SetDirty(this);
}
@ -84,6 +126,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
this.volumeOffset = EditorGUILayout.Slider("Volume Offset", this.volumeOffset, -1, 1);
this.pitchOffset = EditorGUILayout.Slider("Pitch Offset", this.pitchOffset, -1, 1);
EditorGUILayout.MinMaxSlider("Start Time", ref this.minStartTime, ref this.maxStartTime, 0, 1);
}
#endif

Просмотреть файл

Просмотреть файл

@ -36,7 +36,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
Debug.LogErrorFormat(activeEvent.rootEvent, "AudioManager: Event \"{0}\" not localized for language: {1}", activeEvent.rootEvent.name, AudioManager.CurrentLanguage);
Debug.LogErrorFormat("AudioManager: Event \"{0}\" not localized for language: {1}", activeEvent.name, AudioManager.CurrentLanguage);
}
#if UNITY_EDITOR

Просмотреть файл

@ -3,6 +3,7 @@
using UnityEngine;
using System.Globalization;
using System.Collections;
using System.Collections.Generic;
namespace Microsoft.MixedReality.Toolkit.Audio
@ -17,13 +18,21 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private static AudioManager Instance;
/// <summary>
/// Flag for creating instances, set to false during shutdown
/// </summary>
private static bool AllowCreateInstance = true;
/// <summary>
/// The currently-playing events at runtime
/// </summary>
private static List<ActiveEvent> ActiveEvents = new List<ActiveEvent>();
public static List<ActiveEvent> ActiveEvents { get; private set; }
/// <summary>
/// The AudioSource components that have been added by a previously-played event
/// </summary>
private static List<AudioSource> AvailableSources = new List<AudioSource>();
private static readonly List<AudioSource> AvailableSources = new List<AudioSource>();
/// <summary>
/// List of the previously started events
/// </summary>
private static readonly List<ActiveEvent> previousEvents = new List<ActiveEvent>();
/// <summary>
/// The language that all voice events should play in
/// </summary>
@ -32,6 +41,36 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// The full list of languages available
/// </summary>
public static string[] Languages;
/// <summary>
/// The default number of AudioSources to create in the pool
/// </summary>
private static int DefaultSourcesCount = 80;
/// <summary>
/// The total list of AudioSources for the manager to use
/// </summary>
private static readonly List<AudioSource> SourcePool = new List<AudioSource>();
private static bool debugMode = false;
public static bool DebugMode => debugMode;
private const int MaxPreviousEvents = 300;
public static List<ActiveEvent> PreviousEvents => previousEvents;
float lastTime = 0f;
private readonly struct ActiveEventRemovalTimestamp
{
public readonly float RemovalTime;
public readonly ActiveEvent ActiveEvent;
public ActiveEventRemovalTimestamp(float removalTime, ActiveEvent activeEvent)
{
RemovalTime = removalTime;
ActiveEvent = activeEvent;
}
}
// We could get fancy and sort, but this list is usually pretty small, and the sort call can be expensive
private readonly List<ActiveEventRemovalTimestamp> delayedEventsToRemove = new();
#region Interface
@ -43,46 +82,28 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <returns>The reference for the runtime event that can be modified or stopped explicitly</returns>
public static ActiveEvent PlayEvent(AudioEvent eventToPlay, GameObject emitterObject)
{
if (eventToPlay == null)
if (!ValidateManager() || !ValidateEvent(eventToPlay))
{
return null;
}
ValidateManager();
if (eventToPlay.InstanceLimit > 0 && CountActiveInstances(eventToPlay) >= eventToPlay.InstanceLimit)
{
//Debug.LogFormat("AudioManager: Instance limit reached for {0}.", eventToPlay.name);
return null;
}
if (eventToPlay.Group != 0)
{
StopGroupInstances(eventToPlay.Group);
}
AudioSource tempSource = GetUnusedSource(emitterObject);
if (tempSource == null)
{
tempSource = emitterObject.AddComponent<AudioSource>();
tempSource.playOnAwake = false;
}
else
{
AvailableSources.Remove(tempSource);
}
ActiveEvent tempEvent = new ActiveEvent(eventToPlay, tempSource);
ActiveEvent tempEvent = new ActiveEvent(eventToPlay, emitterObject.transform);
tempEvent.Play();
if (AvailableSources.Contains(tempSource))
{
AvailableSources.Remove(tempSource);
return tempEvent;
}
if (tempEvent.clip != null)
public static ActiveEvent PlayEvent(AudioEvent eventToPlay, Vector3 position)
{
ActiveEvents.Add(tempEvent);
if (!ValidateManager() || !ValidateEvent(eventToPlay))
{
return null;
}
ActiveEvent tempEvent = new ActiveEvent(eventToPlay, null);
tempEvent.Play();
tempEvent.SetAllSourcePositions(position);
return tempEvent;
}
@ -94,34 +115,30 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <returns>The reference for the runtime event that can be modified or stopped explicitly</returns>
public static ActiveEvent PlayEvent(AudioEvent eventToPlay, AudioSource emitter)
{
ValidateManager();
if (eventToPlay.InstanceLimit > 0 && CountActiveInstances(eventToPlay) >= eventToPlay.InstanceLimit)
Debug.LogWarningFormat("AudioManager: deprecated function called on event {0} - play on an AudioSource no longer supported");
if (!ValidateManager() || !ValidateEvent(eventToPlay))
{
Debug.LogFormat("AudioManager: Instance limit reached for {0}.", eventToPlay.name);
return null;
}
if (eventToPlay.Group != 0)
{
StopGroupInstances(eventToPlay.Group);
}
ActiveEvent tempEvent = new ActiveEvent(eventToPlay, emitter);
eventToPlay.SetActiveEventProperties(tempEvent);
ActiveEvents.Add(tempEvent);
if (AvailableSources.Contains(emitter))
{
//Debug.LogFormat("Removing available source {0}", emitter.GetInstanceID());
AvailableSources.Remove(emitter);
}
ActiveEvent tempEvent = new ActiveEvent(eventToPlay, emitter.transform);
tempEvent.Play();
return tempEvent;
}
/// <summary>
/// Stop all active instances of an audio event
/// </summary>
/// <param name="eventsToStop">The event to stop all instances of</param>
public static void StopAll(AudioEvent eventsToStop)
{
for (int i = 0; i < ActiveEvents.Count; i++)
if (!ValidateManager())
{
return;
}
for (int i = ActiveEvents.Count - 1; i >= 0; i--)
{
ActiveEvent tempEvent = ActiveEvents[i];
if (tempEvent.rootEvent == eventsToStop)
@ -132,12 +149,24 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
/// <summary>
/// Accessor for the list of ActiveEvents
/// Stop all active instances of a group
/// </summary>
/// <returns>The list of ActiveEvents</returns>
public static List<ActiveEvent> GetActiveEvents()
/// <param name="groupNum">The group number to stop all instances of</param>
public static void StopAll(int groupNum)
{
return ActiveEvents;
if (!ValidateManager())
{
return;
}
for (int i = ActiveEvents.Count - 1; i >= 0; i--)
{
ActiveEvent tempEvent = ActiveEvents[i];
if (tempEvent.rootEvent.Group == groupNum)
{
tempEvent.Stop();
}
}
}
/// <summary>
@ -146,15 +175,35 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <param name="stoppedEvent">The event that is no longer playing to remove from the ActiveEvent list</param>
public static void RemoveActiveEvent(ActiveEvent stoppedEvent)
{
if (!AvailableSources.Contains(stoppedEvent.source))
if (!ValidateManager())
{
AvailableSources.Add(stoppedEvent.source);
return;
}
List<EventSource> sources = stoppedEvent.sources;
for (int i = 0; i < sources.Count; i++)
{
AudioSource tempSource = sources[i].source;
if (!AvailableSources.Contains(tempSource))
{
AvailableSources.Add(tempSource);
}
}
ActiveEvents.Remove(stoppedEvent);
stoppedEvent = null;
}
public static void AddPreviousEvent(ActiveEvent newEvent)
{
previousEvents.Add(newEvent);
while (previousEvents.Count > MaxPreviousEvents)
{
previousEvents.RemoveAt(0);
}
}
/// <summary>
/// Get the list of all cultures for compatible languges
/// </summary>
@ -168,16 +217,63 @@ namespace Microsoft.MixedReality.Toolkit.Audio
}
}
public static void SetDebugMode(bool toggle)
{
debugMode = toggle;
ClearSourceText();
}
public static void DelayRemoveActiveEvent(ActiveEvent eventToRemove, float delay = 1)
{
if (!ValidateManager())
{
return;
}
Instance.delayedEventsToRemove.Add(new ActiveEventRemovalTimestamp(Time.time + delay, eventToRemove));
}
public static IEnumerator RemoveActiveEventCoroutine(ActiveEvent eventToRemove, float delay)
{
yield return new WaitForSeconds(delay);
AudioManager.RemoveActiveEvent(eventToRemove);
}
#endregion
#region Private Functions
private void Update()
{
// First check and remove delayed events
if (lastTime > Time.time)
{
// Time.time has rolled over, lets kludge it and remove all (This should be rare)
Debug.LogWarning("Time Rollover, clearing all delayed events");
foreach (var eventToRemove in delayedEventsToRemove)
{
RemoveActiveEvent(eventToRemove.ActiveEvent);
}
delayedEventsToRemove.Clear();
}
else
{
for (int i = delayedEventsToRemove.Count - 1; i >= 0; i--)
{
if (delayedEventsToRemove[i].RemovalTime < Time.time)
{
RemoveActiveEvent(delayedEventsToRemove[i].ActiveEvent);
delayedEventsToRemove.RemoveAt(i);
}
}
}
lastTime = Time.time;
for (int i = 0; i < ActiveEvents.Count; i++)
{
ActiveEvent tempEvent = ActiveEvents[i];
if (tempEvent != null && tempEvent.source != null)
if (tempEvent != null && tempEvent.sources.Count != 0)
{
tempEvent.Update();
}
@ -189,15 +285,59 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
private static void CreateInstance()
{
if (Instance != null)
if (Instance != null || !AllowCreateInstance)
{
return;
}
CurrentLanguage = 0;
ActiveEvents = new List<ActiveEvent>();
GameObject instanceObject = new GameObject("AudioManager");
Instance = instanceObject.AddComponent<AudioManager>();
DontDestroyOnLoad(instanceObject);
CreateSources();
Application.quitting += HandleQuitting;
}
/// <summary>
/// On shutdown we cannot create an instance
/// </summary>
private static void HandleQuitting()
{
AllowCreateInstance = false;
}
/// <summary>
/// Create the pool of AudioSources
/// </summary>
private static void CreateSources()
{
for (int i = 0; i < DefaultSourcesCount; i++)
{
GameObject sourceGO = new GameObject("AudioSource" + i);
sourceGO.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
sourceGO.transform.SetParent(Instance.transform);
AudioSource tempSource = sourceGO.AddComponent<AudioSource>();
tempSource.playOnAwake = false;
SourcePool.Add(tempSource);
AvailableSources.Add(tempSource);
#if UNITY_EDITOR
TextMesh newText = sourceGO.AddComponent<TextMesh>();
newText.characterSize = 0.2f;
#endif
}
}
private static void ClearSourceText()
{
for (int i = 0; i < AvailableSources.Count; i++)
{
TextMesh tempText = AvailableSources[i].GetComponent<TextMesh>();
if (tempText != null)
{
tempText.text = string.Empty;
}
}
}
/// <summary>
@ -231,7 +371,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
ActiveEvent tempEvent = ActiveEvents[i];
if (tempEvent.rootEvent.Group == groupNum)
{
Debug.LogFormat("Stopping: {0}", tempEvent.rootEvent.name);
Debug.LogFormat("Stopping: {0}", tempEvent.name);
tempEvent.StopImmediate();
}
}
@ -242,22 +382,21 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// </summary>
/// <param name="emitterObject">The GameObject the AudioSource needs to be attached to</param>
/// <returns>An AudioSource reference if one exists, otherwise null</returns>
private static AudioSource GetUnusedSource(GameObject emitterObject)
public static AudioSource GetUnusedSource()
{
ClearNullAudioSources();
for (int i = 0; i < AvailableSources.Count; i++)
if (AvailableSources.Count > 0)
{
AudioSource tempSource = AvailableSources[i];
if (tempSource.gameObject == emitterObject)
{
//Debug.LogFormat("{0} Sending available source {1}", Time.time, tempSource.GetInstanceID());
AudioSource tempSource = AvailableSources[0];
AvailableSources.Remove(tempSource);
return tempSource;
}
}
else
{
return null;
}
}
/// <summary>
/// Remove any references to AudioSource components that no longer exist
@ -278,19 +417,36 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// Make sure that the AudioManager has all of the required components
/// </summary>
/// <returns>Whether there is a valid AudioManager instance</returns>
private static bool ValidateManager()
public static bool ValidateManager()
{
if (Instance == null)
{
CreateInstance();
if (Instance == null)
}
return Instance != null;
}
private static bool ValidateEvent(AudioEvent eventToPlay)
{
if (eventToPlay == null)
{
return false;
}
else
if (!eventToPlay.ValidateAudioFiles())
{
return true;
return false;
}
if (eventToPlay.InstanceLimit > 0 && CountActiveInstances(eventToPlay) >= eventToPlay.InstanceLimit)
{
return false;
}
if (eventToPlay.Group != 0)
{
StopGroupInstances(eventToPlay.Group);
}
return true;

Просмотреть файл

Просмотреть файл

@ -45,7 +45,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
/// <summary>
/// The minimum possible value for an AudioSource's pitch property
/// </summary>
protected const float Pitch_Min = -3;
protected const float Pitch_Min = 0.01f;
/// <summary>
/// The maximum possible value for an AudioSource's pitch property
/// </summary>
@ -69,13 +69,13 @@ namespace Microsoft.MixedReality.Toolkit.Audio
{
if (this.input == null)
{
Debug.LogWarningFormat(activeEvent.source, "{0} does not have an input on node {1}", activeEvent, this.name);
Debug.LogWarningFormat("{0} does not have an input on node {1}", activeEvent, this.name);
return;
}
if (nodeNum >= this.input.ConnectedNodes.Length)
{
Debug.LogWarningFormat(activeEvent.source, "{0} tried to access invalid connected node {1}", this.name, nodeNum);
Debug.LogWarningFormat("{0} tried to access invalid connected node {1}", this.name, nodeNum);
return;
}
@ -226,7 +226,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
Vector2 tempPos = new Vector2(this.nodeRect.x, this.nodeRect.y);
tempPos.x -= this.input.Window.width;
tempPos.y += (this.nodeRect.height / 2);
tempPos.y += (this.nodeRect.height / 2) - 5;
this.input.Window.position = tempPos;
if (ConnectorTexture == null)
@ -254,7 +254,7 @@ namespace Microsoft.MixedReality.Toolkit.Audio
Vector2 tempPos = new Vector2(this.nodeRect.x, this.nodeRect.y);
tempPos.x += this.nodeRect.width;
tempPos.y += (this.nodeRect.height / 2);
tempPos.y += (this.nodeRect.height / 2) - 10;
this.output.Window.position = tempPos;
if (ConnectorTexture == null)

Просмотреть файл

Просмотреть файл

Просмотреть файл

25
Runtime/AudioNullFile.cs Normal file
Просмотреть файл

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Microsoft.MixedReality.Toolkit.Audio
{
public class AudioNullFile : AudioNode
{
#if UNITY_EDITOR
private const float NodeHeight = 50;
public override void InitializeNode(Vector2 position)
{
this.name = "Null File";
this.nodeRect.position = position;
this.nodeRect.height = NodeHeight;
AddOutput();
EditorUtility.SetDirty(this);
}
#endif
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше