Updated oculus stuff

This commit is contained in:
Chris Midkiff 2018-10-09 20:59:57 -04:00
parent 1e7362c19f
commit 9b7f63739e
957 changed files with 128988 additions and 588 deletions

8
Assets/FittsLawVR.meta Normal file
View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3d0ed8ddd4ae30547a37f12335d8a28e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 39850532bc74a4078a24832112e8aef3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dc278786e6540af428ccbf7825495004
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/JsonDotNet.meta Normal file
View File

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

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 577d9725f58264943855b8ac185531fe
folderAsset: yes
timeCreated: 1466788344
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 14f21d7a1e53a8c4e87b25526a7eb63c
folderAsset: yes
timeCreated: 1466788345
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aadad8ac54f29e44583510294ac5c312
timeCreated: 1466788355
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,76 @@
fileFormatVersion: 2
guid: 6a3c684705042f345975d924f6983e36
timeCreated: 1466788352
licenseType: Store
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 1
settings:
CPU: AnyCPU
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
Linux:
enabled: 0
settings:
CPU: x86
Linux64:
enabled: 0
settings:
CPU: x86_64
OSXIntel:
enabled: 0
settings:
CPU: AnyCPU
OSXIntel64:
enabled: 0
settings:
CPU: AnyCPU
SamsungTV:
enabled: 1
settings:
STV_MODEL: STANDARD_13
Tizen:
enabled: 1
settings: {}
WebGL:
enabled: 1
settings: {}
Win:
enabled: 0
settings:
CPU: AnyCPU
Win64:
enabled: 0
settings:
CPU: AnyCPU
WindowsStoreApps:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath: Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll
SDK: AnySDK
ScriptingBackend: Il2Cpp
iOS:
enabled: 1
settings:
CompileFlags:
FrameworkDependencies:
tvOS:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 01ef782d02bb1994dbe418b69432552b
folderAsset: yes
timeCreated: 1466788344
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d6807fedb8dcaf04682d2c84f0ab753f
timeCreated: 1466788355
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,75 @@
fileFormatVersion: 2
guid: 17aef65a15b471f468b5fbeb4ff0c6a1
timeCreated: 1466788349
licenseType: Store
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 0
settings:
CPU: AnyCPU
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
Linux:
enabled: 1
settings:
CPU: x86
Linux64:
enabled: 1
settings:
CPU: x86_64
LinuxUniversal:
enabled: 1
settings:
CPU: AnyCPU
OSXIntel:
enabled: 1
settings:
CPU: AnyCPU
OSXIntel64:
enabled: 1
settings:
CPU: AnyCPU
OSXUniversal:
enabled: 1
settings:
CPU: AnyCPU
SamsungTV:
enabled: 0
settings:
STV_MODEL: STANDARD_13
Win:
enabled: 1
settings:
CPU: AnyCPU
Win64:
enabled: 1
settings:
CPU: AnyCPU
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath:
SDK: AnySDK
ScriptingBackend: Il2Cpp
iOS:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1418141139a6ac443b18cb05c0643a29
folderAsset: yes
timeCreated: 1466788345
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 36f7323c55864364d8bb88c736e4bca6
timeCreated: 1466788355
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,67 @@
fileFormatVersion: 2
guid: 9b6ba260dada0ea4a871a42011f8b87d
timeCreated: 1466788355
licenseType: Store
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 0
settings:
CPU: AnyCPU
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
Linux:
enabled: 0
settings:
CPU: x86
Linux64:
enabled: 0
settings:
CPU: x86_64
OSXIntel:
enabled: 0
settings:
CPU: AnyCPU
OSXIntel64:
enabled: 0
settings:
CPU: AnyCPU
SamsungTV:
enabled: 0
settings:
STV_MODEL: STANDARD_13
Win:
enabled: 0
settings:
CPU: AnyCPU
Win64:
enabled: 0
settings:
CPU: AnyCPU
WindowsStoreApps:
enabled: 1
settings:
CPU: AnyCPU
DontProcess: False
PlaceholderPath: Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll
SDK: AnySDK
ScriptingBackend: DotNet
iOS:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 76f828f47ce26cc43991113c6a39dbbf
folderAsset: yes
timeCreated: 1466010535
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4e7d9a07cc3f02a41a575406e7230846
timeCreated: 1466788421
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9a6f8c7c1ea72ce46831c5e1b6150d0c
timeCreated: 1466790933
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="System">
<type fullname="System.ComponentModel.TypeConverter" preserve="all" />
<!-- <namespace fullname="System.ComponentModel" preserve="all" /> -->
</assembly>
</linker>

View File

@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 06314f49bdda26043963578d60a0a7ee
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -72,5 +72,5 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0, b: 1, a: 1}
- _Color: {r: 0, g: 1, b: 0.9582815, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e8bd6fc3bb11b734ebab29d20ce38dbe
folderAsset: yes
timeCreated: 1538788975
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 29ab7e927676ef74a93aeedf4146f1ac
folderAsset: yes
timeCreated: 1470780399
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 180c8a539f95cce428f820b0ba392c1f
folderAsset: yes
timeCreated: 1468506676
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 485ac48a563e2bf44bb4de7ead5a1f68
timeCreated: 1461716881
licenseType: Store
AudioImporter:
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 7000b4d67a1320940b363f3cf891dfff
timeCreated: 1461716881
licenseType: Store
AudioImporter:
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 8198ccc08475a764daaf226b841a55f1
timeCreated: 1461716882
licenseType: Store
AudioImporter:
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6d597fe114807b54a99033a3dae9ce0d
folderAsset: yes
timeCreated: 1470780399
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7ee6cbebddf12044c95f9d6eb6e40823
folderAsset: yes
timeCreated: 1470780399
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
public class TestScript : MonoBehaviour {
[InspectorNote( "Sound Setup", "Press '1' to play testSound1 and '2' to play testSound2")]
public SoundFXRef testSound1;
public SoundFXRef testSound2;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
// use attached game object location
if ( Input.GetKeyDown( KeyCode.Alpha1 ) )
{
testSound1.PlaySoundAt( transform.position );
}
// hard code information
if ( Input.GetKeyDown( KeyCode.Alpha2 ) ) {
testSound2.PlaySoundAt( new Vector3( 5.0f, 0.0f, 0.0f ) );
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: cfae243ecd01edd49bd439c56a8b18cf
timeCreated: 1468506975
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,434 @@
%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: 8
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: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 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: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 8
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 1024
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_LightingDataAsset: {fileID: 0}
m_ShadowMaskMode: 2
--- !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
m_NavMeshData: {fileID: 0}
--- !u!1 &767466533
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 767466535}
- component: {fileID: 767466534}
m_Layer: 0
m_Name: AudioManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &767466534
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 767466533}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6d1d30b41806244fca035fdae2896fb7, type: 3}
m_Name:
m_EditorClassIdentifier:
makePersistent: 1
enableSpatializedAudio: 1
enableSpatializedFastOverride: 0
audioMixer: {fileID: 0}
defaultMixerGroup: {fileID: 24300001, guid: 323417d454569d94fa01d511f6eb44d9, type: 2}
reservedMixerGroup: {fileID: 0}
voiceChatMixerGroup: {fileID: 0}
verboseLogging: 0
maxSoundEmitters: 32
volumeSoundFX: 1
soundFxFadeSecs: 1
audioMinFallOffDistance: 1
audioMaxFallOffDistance: 25
soundGroupings:
- name: Test Group
soundList:
- name: TestSound1
playback: 0
volume: 1
pitchVariance: {x: 0.95, y: 1.05}
falloffDistance: {x: 1, y: 25}
falloffCurve: 2
volumeFalloffCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1.0044228
inSlope: -1.9459304
outSlope: -1.9459304
tangentMode: 0
- serializedVersion: 2
time: 0.27001944
value: 0.24837627
inSlope: -1.3226271
outSlope: -1.3226271
tangentMode: 0
- serializedVersion: 2
time: 0.99744946
value: -0.0020017216
inSlope: -0.42040923
outSlope: -0.42040923
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
reverbZoneMix:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1.0044228
inSlope: -1.9459304
outSlope: -1.9459304
tangentMode: 0
- serializedVersion: 2
time: 0.36357749
value: 0.4567863
inSlope: -1.3226271
outSlope: -1.3226271
tangentMode: 0
- serializedVersion: 2
time: 0.99594045
value: 0.19572063
inSlope: -0.107312
outSlope: -0.107312
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 0
spread: 0
pctChanceToPlay: 1
priority: 0
delay: {x: 0, y: 0}
looping: 0
ospProps:
enableSpatialization: 1
useFastOverride: 1
gain: 0
enableInvSquare: 1
volumetric: 0
invSquareFalloff: {x: 1, y: 250}
soundClips:
- {fileID: 8300000, guid: 7000b4d67a1320940b363f3cf891dfff, type: 3}
- {fileID: 8300000, guid: 8198ccc08475a764daaf226b841a55f1, type: 3}
visibilityToggle: 0
- name: TestSound2
playback: 0
volume: 1
pitchVariance: {x: 0.79999995, y: 1.25}
falloffDistance: {x: 1, y: 25}
falloffCurve: 1
volumeFalloffCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMix:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spread: 0
pctChanceToPlay: 1
priority: 0
delay: {x: 0, y: 0}
looping: 0
ospProps:
enableSpatialization: 1
useFastOverride: 0
gain: 0
enableInvSquare: 0
volumetric: 0
invSquareFalloff: {x: 1, y: 25}
soundClips:
- {fileID: 8300000, guid: 485ac48a563e2bf44bb4de7ead5a1f68, type: 3}
- {fileID: 8300000, guid: d3994560fb567c34a821fd9355c10eef, type: 3}
visibilityToggle: 0
mixerGroup: {fileID: 24300001, guid: 1dd706bb85d8aef4e83a6229dbd62c36, type: 2}
maxPlayingSounds: 0
preloadAudio: 0
volumeOverride: 1
playingSoundCount: 0
--- !u!4 &767466535
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 767466533}
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: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1050355579
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1050355581}
- component: {fileID: 1050355580}
m_Layer: 0
m_Name: TestScript
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1050355580
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1050355579}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfae243ecd01edd49bd439c56a8b18cf, type: 3}
m_Name:
m_EditorClassIdentifier:
testSound1:
soundFXName: TestSound1
testSound2:
soundFXName: TestSound2
--- !u!4 &1050355581
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1050355579}
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!1 &2106254871
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2106254876}
- component: {fileID: 2106254875}
- component: {fileID: 2106254874}
- component: {fileID: 2106254873}
- component: {fileID: 2106254872}
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 &2106254872
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2106254871}
m_Enabled: 1
--- !u!124 &2106254873
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2106254871}
m_Enabled: 1
--- !u!92 &2106254874
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2106254871}
m_Enabled: 1
--- !u!20 &2106254875
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2106254871}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
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: 1
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: 0
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &2106254876
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2106254871}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, 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}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 600e5d49b0a68254286400e32c53addc
timeCreated: 1468506358
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 25be027379f7fce4d97ba2bcaf313019
folderAsset: yes
timeCreated: 1470780399
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b8c0d722519c64144a78f8fc99cd40b5
folderAsset: yes
timeCreated: 1468505670
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,113 @@
using UnityEngine;
using System.Collections;
/*
-----------------------
AmbienceEmitter()
-----------------------
*/
public class AmbienceEmitter : MonoBehaviour {
public SoundFXRef[] ambientSounds = new SoundFXRef[0];
public bool autoActivate = true;
[Tooltip("Automatically play the sound randomly again when checked. Should be OFF for looping sounds")]
public bool autoRetrigger = true;
[MinMax( 2.0f, 4.0f, 0.1f, 10.0f )]
public Vector2 randomRetriggerDelaySecs = new Vector2( 2.0f, 4.0f );
[Tooltip( "If defined, the sounds will randomly play from these transform positions, otherwise the sound will play from this transform" )]
public Transform[] playPositions = new Transform[0];
private bool activated = false;
private int playingIdx = -1;
private float nextPlayTime = 0.0f;
private float fadeTime = 0.25f;
private int lastPosIdx = -1;
/*
-----------------------
Awake()
-----------------------
*/
void Awake() {
if ( autoActivate ) {
activated = true;
nextPlayTime = Time.time + Random.Range( randomRetriggerDelaySecs.x, randomRetriggerDelaySecs.y );
}
// verify all the play positions are valid
foreach ( Transform t in playPositions ) {
if ( t == null ) {
Debug.LogWarning( "[AmbienceEmitter] Invalid play positions in " + name );
playPositions = new Transform[0];
break;
}
}
}
/*
-----------------------
Update()
-----------------------
*/
void Update() {
if ( activated ) {
if ( ( playingIdx == -1 ) || autoRetrigger ) {
if ( Time.time >= nextPlayTime ) {
Play();
if ( !autoRetrigger ) {
activated = false;
}
}
}
}
}
/*
-----------------------
OnTriggerEnter()
-----------------------
*/
public void OnTriggerEnter( Collider col ) {
activated = !activated;
}
/*
-----------------------
Play()
-----------------------
*/
public void Play() {
Transform transformToPlayFrom = transform;
if ( playPositions.Length > 0 ) {
int idx = Random.Range( 0, playPositions.Length );
while ( ( playPositions.Length > 1 ) && ( idx == lastPosIdx ) ) {
idx = Random.Range( 0, playPositions.Length );
}
transformToPlayFrom = playPositions[idx];
lastPosIdx = idx;
}
playingIdx = ambientSounds[Random.Range(0, ambientSounds.Length)].PlaySoundAt( transformToPlayFrom.position );
if ( playingIdx != -1 ) {
AudioManager.FadeInSound( playingIdx, fadeTime );
nextPlayTime = Time.time + Random.Range( randomRetriggerDelaySecs.x, randomRetriggerDelaySecs.y );
}
}
/*
-----------------------
EnableEmitter()
-----------------------
*/
public void EnableEmitter( bool enable ) {
activated = enable;
if ( enable ) {
Play();
} else {
if ( playingIdx != -1 ) {
AudioManager.FadeOutSound( playingIdx, fadeTime );
}
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c11944691f6b9cf44a391c95cb3f7dea
timeCreated: 1455050294
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,425 @@
using UnityEngine;
using UnityEngine.Audio;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
using System;
using System.Reflection;
#endif
public enum PreloadSounds {
Default, // default unity behavior
Preload, // audio clips are forced to preload
ManualPreload, // audio clips are forced to not preload, preloading must be done manually
}
public enum Fade
{
In,
Out
}
[System.Serializable]
public class SoundGroup {
public SoundGroup( string name ) {
this.name = name;
}
public SoundGroup() {
mixerGroup = null;
maxPlayingSounds = 0;
preloadAudio = PreloadSounds.Default;
volumeOverride = 1.0f;
}
public void IncrementPlayCount() {
playingSoundCount = Mathf.Clamp( ++playingSoundCount, 0, maxPlayingSounds );
}
public void DecrementPlayCount() {
playingSoundCount = Mathf.Clamp( --playingSoundCount, 0, maxPlayingSounds );
}
public bool CanPlaySound() {
return ( maxPlayingSounds == 0 ) || ( playingSoundCount < maxPlayingSounds );
}
public string name = string.Empty;
public SoundFX[] soundList = new SoundFX[0];
public AudioMixerGroup mixerGroup = null; // default = AudioManager.defaultMixerGroup
[Range(0,64)]
public int maxPlayingSounds = 0; // default = 0, unlimited
// TODO: this preload behavior is not yet implemented
public PreloadSounds preloadAudio = PreloadSounds.Default; // default = true, audio clip data will be preloaded
public float volumeOverride = 1.0f; // default = 1.0
[HideInInspector]
public int playingSoundCount = 0;
}
/*
-----------------------
AudioManager
-----------------------
*/
public partial class AudioManager : MonoBehaviour {
[Tooltip("Make the audio manager persistent across all scene loads")]
public bool makePersistent = true; // true = don't destroy on load
[Tooltip("Enable the OSP audio plugin features")]
public bool enableSpatializedAudio = true; // true = enable spatialized audio
[Tooltip("Always play spatialized sounds with no reflections (Default)")]
public bool enableSpatializedFastOverride = false; // true = disable spatialized reflections override
[Tooltip("The audio mixer asset used for snapshot blends, etc.")]
public AudioMixer audioMixer = null;
[Tooltip( "The audio mixer group used for the pooled emitters" )]
public AudioMixerGroup defaultMixerGroup = null;
[Tooltip( "The audio mixer group used for the reserved pool emitter" )]
public AudioMixerGroup reservedMixerGroup = null;
[Tooltip( "The audio mixer group used for voice chat" )]
public AudioMixerGroup voiceChatMixerGroup = null;
[Tooltip("Log all PlaySound calls to the Unity console")]
public bool verboseLogging = false; // true = log all PlaySounds
[Tooltip("Maximum sound emitters")]
public int maxSoundEmitters = 32; // total number of sound emitters created
[Tooltip("Default volume for all sounds modulated by individual sound FX volumes")]
public float volumeSoundFX = 1.0f; // user pref: volume of all sound FX
[Tooltip("Sound FX fade time")]
public float soundFxFadeSecs = 1.0f; // sound FX fade time
public float audioMinFallOffDistance = 1.0f; // minimum falloff distance
public float audioMaxFallOffDistance = 25.0f; // maximum falloff distance
public SoundGroup[] soundGroupings = new SoundGroup[0];
private Dictionary<string,SoundFX> soundFXCache = null;
static private AudioManager theAudioManager = null;
static private FastList<string> names = new FastList<string>();
static private string[] defaultSound = new string[1] { "Default Sound" };
static private SoundFX nullSound = new SoundFX();
static private bool hideWarnings = false;
static public bool enableSpatialization { get { return ( theAudioManager !=null ) ? theAudioManager.enableSpatializedAudio : false; } }
static public AudioManager Instance { get { return theAudioManager; } }
static public float NearFallOff { get { return theAudioManager.audioMinFallOffDistance; } }
static public float FarFallOff { get { return theAudioManager.audioMaxFallOffDistance; } }
static public AudioMixerGroup EmitterGroup { get { return theAudioManager.defaultMixerGroup; } }
static public AudioMixerGroup ReservedGroup { get { return theAudioManager.reservedMixerGroup; } }
static public AudioMixerGroup VoipGroup { get { return theAudioManager.voiceChatMixerGroup; } }
/*
-----------------------
Awake()
-----------------------
*/
void Awake() {
Init();
}
/*
-----------------------
OnDestroy()
-----------------------
*/
void OnDestroy() {
// we only want the initialized audio manager instance cleaning up the sound emitters
if ( theAudioManager == this ) {
if ( soundEmitterParent != null ) {
Destroy( soundEmitterParent );
}
}
///TODO - if you change scenes you'll want to call OnPreSceneLoad to detach the sound emitters
///from anything they might be parented to or they will get destroyed with that object
///there should only be one instance of the AudioManager across the life of the game/app
///GameManager.OnPreSceneLoad -= OnPreSceneLoad;
}
/*
-----------------------
Init()
-----------------------
*/
void Init() {
if ( theAudioManager != null ) {
if ( Application.isPlaying && ( theAudioManager != this ) ) {
enabled = false;
}
return;
}
theAudioManager = this;
///TODO - if you change scenes you'll want to call OnPreSceneLoad to detach the sound emitters
///from anything they might be parented to or they will get destroyed with that object
///there should only be one instance of the AudioManager across the life of the game/app
///GameManager.OnPreSceneLoad += OnPreSceneLoad;
// make sure the first one is a null sound
nullSound.name = "Default Sound";
// build the sound FX cache
RebuildSoundFXCache();
// create the sound emitters
if ( Application.isPlaying ) {
InitializeSoundSystem();
if ( makePersistent && ( transform.parent == null ) ) {
// don't destroy the audio manager on scene loads
DontDestroyOnLoad( gameObject );
}
}
#if UNITY_EDITOR
Debug.Log( "[AudioManager] Initialized..." );
#endif
}
/*
-----------------------
Update()
-----------------------
*/
void Update() {
// update the free and playing lists
UpdateFreeEmitters();
}
/*
-----------------------
RebuildSoundFXCache()
-----------------------
*/
void RebuildSoundFXCache() {
// build the SoundFX dictionary for quick name lookups
int count = 0;
for ( int group = 0; group < soundGroupings.Length; group++ ) {
count += soundGroupings[group].soundList.Length;
}
soundFXCache = new Dictionary<string,SoundFX>( count + 1 );
// add the null sound
soundFXCache.Add( nullSound.name, nullSound );
// add the rest
for ( int group = 0; group < soundGroupings.Length; group++ ) {
for ( int i = 0; i < soundGroupings[group].soundList.Length; i++ ) {
if ( soundFXCache.ContainsKey( soundGroupings[group].soundList[i].name ) ) {
Debug.LogError( "ERROR: Duplicate Sound FX name in the audio manager: '" + soundGroupings[group].name + "' > '" + soundGroupings[group].soundList[i].name + "'" );
} else {
soundGroupings[group].soundList[i].Group = soundGroupings[group];
soundFXCache.Add( soundGroupings[group].soundList[i].name, soundGroupings[group].soundList[i] );
}
}
soundGroupings[group].playingSoundCount = 0;
}
}
/*
-----------------------
FindSoundFX()
-----------------------
*/
static public SoundFX FindSoundFX( string name, bool rebuildCache = false ) {
#if UNITY_EDITOR
if ( theAudioManager == null ) {
Debug.LogError( "ERROR: audio manager not yet initialized or created!" + " Time: " + Time.time );
return null;
}
#endif
if ( string.IsNullOrEmpty( name ) ) {
return nullSound;
}
if ( rebuildCache ) {
theAudioManager.RebuildSoundFXCache();
}
if ( !theAudioManager.soundFXCache.ContainsKey( name ) ) {
#if DEBUG_BUILD || UNITY_EDITOR
Debug.LogError( "WARNING: Missing Sound FX in cache: " + name );
#endif
return nullSound;
}
return theAudioManager.soundFXCache[name];
}