浏览代码

Add script to orient audio listener with the camera (#457)

* Add script to orient audio listener with the camera

* Use TransformAnchor to compute listener orientation
/main
GitHub 3 年前
当前提交
06df8c3e
共有 3 个文件被更改,包括 181 次插入140 次删除
  1. 294
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  2. 16
      UOP1_Project/Assets/OrientListener.cs
  3. 11
      UOP1_Project/Assets/OrientListener.cs.meta

294
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab


m_Component:
- component: {fileID: 2926160625589528084}
- component: {fileID: 5253396771523728900}
- component: {fileID: 607284298244238899}
m_Layer: 0
m_Name: Listener
m_TagString: Untagged

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8663361307073201546}
m_Enabled: 1
--- !u!114 &607284298244238899
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8663361307073201546}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ade2516f57e849c696156d1986d64b3, type: 3}
m_Name:
m_EditorClassIdentifier:
_cameraTransform: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb, type: 2}
--- !u!1001 &63278755811306411
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c478a391cfbc4b74ebda3f9a57283705, type: 3}
--- !u!4 &8637924750589673304 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9182121511924208368, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9124457888259134664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -707639030120515232, guid: c478a391cfbc4b74ebda3f9a57283705,

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5700738674217691736 stripped
--- !u!4 &1414160192716409753 stripped
m_CorrespondingSourceObject: {fileID: 5156753003295213552, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 1958356815571363377, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1083073290189785667 stripped
--- !u!4 &8637924750589673304 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9182121511924208368, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &4758616446005709032 stripped
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -3853004972517743296, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!137 &2643181883930254223 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: -6042959897766808025, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &436620074108784059 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1045485693096927251, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &7479199366626129125 stripped
--- !u!4 &7450739070704029045 stripped
m_CorrespondingSourceObject: {fileID: 8018118334481897805, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -1158771302699065123, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &489423445654532973 stripped
--- !u!4 &5944104996185666453 stripped
m_CorrespondingSourceObject: {fileID: 1028975834724622021, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -2670401387866497475, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8916725356198928834 stripped
--- !u!4 &9049048348530379419 stripped
m_CorrespondingSourceObject: {fileID: -922126996795814806, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -785370636125362381, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8237582483159280860 stripped
--- !u!4 &928224351994020785 stripped
m_CorrespondingSourceObject: {fileID: 8853132977705894260, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 318866306700684825, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8291487101514034000 stripped
--- !u!4 &1083073290189785667 stripped
m_CorrespondingSourceObject: {fileID: -316334440819292424, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8613994902604584134 stripped
--- !u!4 &6905220490405268265 stripped
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 6294103071620228737, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &1414160192716409753 stripped
--- !u!4 &2518796056843120514 stripped
m_CorrespondingSourceObject: {fileID: 1958356815571363377, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 3060741017273451050, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &5337852870612368657 stripped
--- !u!4 &9121043209303941797 stripped
m_CorrespondingSourceObject: {fileID: -4422890038042128199, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8509855438106808077, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &4150588075678938521 stripped
--- !u!4 &5337852870612368657 stripped
m_CorrespondingSourceObject: {fileID: 3536655889091270705, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -4422890038042128199, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &2553538599320838613 stripped
--- !u!4 &7646398735186508214 stripped
m_CorrespondingSourceObject: {fileID: -6061108676553290627, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -2121169907620178914, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &6238229487294904517 stripped
--- !u!4 &6251068571708505270 stripped
m_CorrespondingSourceObject: {fileID: 6782355879607981421, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -2428247613635587810, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &3509300304837266133 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -5170437905352857731, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!137 &2643181883930254223 stripped
SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: -6042959897766808025, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &1693530112229282522 stripped
--- !u!4 &7479199366626129125 stripped
m_CorrespondingSourceObject: {fileID: -6985715532588761230, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8018118334481897805, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &2961255287932742051 stripped
--- !u!4 &489423445654532973 stripped
m_CorrespondingSourceObject: {fileID: 2419873259462771723, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 1028975834724622021, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &4323982477642669181 stripped
--- !u!4 &8916725356198928834 stripped
m_CorrespondingSourceObject: {fileID: -5436760431573913131, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -922126996795814806, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &7422665375057060625 stripped
--- !u!4 &8237582483159280860 stripped
m_CorrespondingSourceObject: {fileID: 8038919574753283769, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8853132977705894260, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &5616668664904030341 stripped
--- !u!4 &8291487101514034000 stripped
m_CorrespondingSourceObject: {fileID: -4215639240221346515, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -316334440819292424, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8764961453140708844 stripped
--- !u!4 &5700738674217691736 stripped
m_CorrespondingSourceObject: {fileID: 8155462669016834116, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 5156753003295213552, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &5352552595453864673 stripped
--- !u!4 &8613994902604584134 stripped
m_CorrespondingSourceObject: {fileID: -4411990312409643191, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8865730958858592416 stripped
--- !u!4 &4150588075678938521 stripped
m_CorrespondingSourceObject: {fileID: 8323785998403603720, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 3536655889091270705, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &313519885195136893 stripped
--- !u!4 &2553538599320838613 stripped
m_CorrespondingSourceObject: {fileID: -8298805101869964587, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -6061108676553290627, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &1780510391696116336 stripped
--- !u!4 &2680419760045213584 stripped
m_CorrespondingSourceObject: {fileID: -8054471524138817576, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 3296533255824239160, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &3597017886523096375 stripped
--- !u!4 &6924639228666418553 stripped
m_CorrespondingSourceObject: {fileID: 4136077574930157727, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 7535686175401523409, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &996919128022108076 stripped
--- !u!4 &8746458819780820913 stripped
m_CorrespondingSourceObject: {fileID: 385238895606393348, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8209158195610554905, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &7980046698497209273 stripped
--- !u!4 &5328577669981913599 stripped
m_CorrespondingSourceObject: {fileID: 7364425696442113553, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 4719641836314782807, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &5338329370284706551 stripped
--- !u!4 &675585260765626204 stripped
m_CorrespondingSourceObject: {fileID: -4424524600484927649, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -9084524466672233740, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &722022415557853372 stripped
--- !u!4 &6856479198010907045 stripped
m_CorrespondingSourceObject: {fileID: 182470111581875476, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 6316997315383997453, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8520217290748661238 stripped
--- !u!4 &7103292230657876148 stripped
m_CorrespondingSourceObject: {fileID: -94429984831856546, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -1576657136440373988, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8731736048503314800 stripped
--- !u!4 &2669244628279071469 stripped
m_CorrespondingSourceObject: {fileID: 8187609794124182744, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -5942939723840012475, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &2669244628279071469 stripped
--- !u!4 &8731736048503314800 stripped
m_CorrespondingSourceObject: {fileID: -5942939723840012475, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8187609794124182744, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &7103292230657876148 stripped
--- !u!4 &8520217290748661238 stripped
m_CorrespondingSourceObject: {fileID: -1576657136440373988, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -94429984831856546, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &6856479198010907045 stripped
--- !u!4 &722022415557853372 stripped
m_CorrespondingSourceObject: {fileID: 6316997315383997453, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 182470111581875476, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &675585260765626204 stripped
--- !u!4 &5338329370284706551 stripped
m_CorrespondingSourceObject: {fileID: -9084524466672233740, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -4424524600484927649, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &5328577669981913599 stripped
--- !u!4 &7980046698497209273 stripped
m_CorrespondingSourceObject: {fileID: 4719641836314782807, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 7364425696442113553, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &8746458819780820913 stripped
--- !u!4 &996919128022108076 stripped
m_CorrespondingSourceObject: {fileID: 8209158195610554905, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 385238895606393348, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &6924639228666418553 stripped
--- !u!4 &3597017886523096375 stripped
m_CorrespondingSourceObject: {fileID: 7535686175401523409, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 4136077574930157727, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &5944104996185666453 stripped
--- !u!4 &1780510391696116336 stripped
m_CorrespondingSourceObject: {fileID: -2670401387866497475, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -8054471524138817576, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &2680419760045213584 stripped
--- !u!4 &313519885195136893 stripped
m_CorrespondingSourceObject: {fileID: 3296533255824239160, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -8298805101869964587, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &6251068571708505270 stripped
--- !u!4 &8865730958858592416 stripped
m_CorrespondingSourceObject: {fileID: -2428247613635587810, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8323785998403603720, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &7646398735186508214 stripped
--- !u!4 &5352552595453864673 stripped
m_CorrespondingSourceObject: {fileID: -2121169907620178914, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -4411990312409643191, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &9121043209303941797 stripped
--- !u!4 &8764961453140708844 stripped
m_CorrespondingSourceObject: {fileID: 8509855438106808077, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8155462669016834116, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &2518796056843120514 stripped
--- !u!4 &5616668664904030341 stripped
m_CorrespondingSourceObject: {fileID: 3060741017273451050, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -4215639240221346515, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &6905220490405268265 stripped
--- !u!4 &7422665375057060625 stripped
m_CorrespondingSourceObject: {fileID: 6294103071620228737, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 8038919574753283769, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &928224351994020785 stripped
--- !u!4 &4323982477642669181 stripped
m_CorrespondingSourceObject: {fileID: 318866306700684825, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -5436760431573913131, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &9049048348530379419 stripped
--- !u!4 &2961255287932742051 stripped
m_CorrespondingSourceObject: {fileID: -785370636125362381, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 2419873259462771723, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &7450739070704029045 stripped
--- !u!4 &1693530112229282522 stripped
m_CorrespondingSourceObject: {fileID: -1158771302699065123, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -6985715532588761230, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &436620074108784059 stripped
--- !u!4 &3509300304837266133 stripped
m_CorrespondingSourceObject: {fileID: 1045485693096927251, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -5170437905352857731, guid: c478a391cfbc4b74ebda3f9a57283705,
--- !u!4 &4758616446005709032 stripped
--- !u!4 &6238229487294904517 stripped
m_CorrespondingSourceObject: {fileID: -3853004972517743296, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 6782355879607981421, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5bf7aeff6af6cad4ba9c19219c9841db, type: 3}
--- !u!198 &4839788363397376542 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 6699398188219967595, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3583992150622067535 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3346050453518178618, guid: 5bf7aeff6af6cad4ba9c19219c9841db,

--- !u!198 &4839788363397376542 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 6699398188219967595, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3384482700167519930
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f8a6e96eef53e5a4686f9a85a72fe73b, type: 3}
--- !u!4 &5607242278399728533 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 482719544232312599, guid: f8a6e96eef53e5a4686f9a85a72fe73b,
type: 3}
m_PrefabInstance: {fileID: 5431934865371800706}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 5431934865371800706}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5607242278399728533 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 482719544232312599, guid: f8a6e96eef53e5a4686f9a85a72fe73b,
type: 3}
m_PrefabInstance: {fileID: 5431934865371800706}
m_PrefabAsset: {fileID: 0}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a75f6395e1487b344a0ffafad66fc95a, type: 3}
--- !u!4 &5633354469276786070 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2004471342811329788, guid: a75f6395e1487b344a0ffafad66fc95a,
--- !u!198 &2152090768827979840 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 5197471990935564586, guid: a75f6395e1487b344a0ffafad66fc95a,
--- !u!198 &2152090768827979840 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 5197471990935564586, guid: a75f6395e1487b344a0ffafad66fc95a,
--- !u!4 &5633354469276786070 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2004471342811329788, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a75f6395e1487b344a0ffafad66fc95a, type: 3}
--- !u!4 &9135146627525748615 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2004471342811329788, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 7284536550510007163}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 7284536550510007163}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9135146627525748615 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2004471342811329788, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 7284536550510007163}
m_PrefabAsset: {fileID: 0}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2a17d00f8cddbf44ea0f55e00cbc97e9, type: 3}
--- !u!4 &8517470450379016030 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 558165235346798506, guid: 2a17d00f8cddbf44ea0f55e00cbc97e9,
type: 3}
m_PrefabInstance: {fileID: 8181670996397994228}
m_PrefabAsset: {fileID: 0}
--- !u!198 &334012115255375375 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 8442424470799517435, guid: 2a17d00f8cddbf44ea0f55e00cbc97e9,

--- !u!4 &8517470450379016030 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 558165235346798506, guid: 2a17d00f8cddbf44ea0f55e00cbc97e9,
type: 3}
m_PrefabInstance: {fileID: 8181670996397994228}
m_PrefabAsset: {fileID: 0}

16
UOP1_Project/Assets/OrientListener.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Orient the listener to point in the same direction as the camera.
public class OrientListener : MonoBehaviour
{
// Reference to the camera transform determine listener orientation
[SerializeField]
private TransformAnchor _cameraTransform;
void LateUpdate()
{
transform.forward = _cameraTransform.Transform.forward;
}
}

11
UOP1_Project/Assets/OrientListener.cs.meta


fileFormatVersion: 2
guid: 0ade2516f57e849c696156d1986d64b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存