fix:Small fix to audio listeners (#20)
Co-authored-by: Cosmin <38663153+Cosmin-B@users.noreply.github.com>
This commit is contained in:
Родитель
85ad881a81
Коммит
3dc3c39f8a
|
@ -17,6 +17,7 @@ GameObject:
|
|||
- component: {fileID: 8200002}
|
||||
- component: {fileID: 509584576524893815}
|
||||
- component: {fileID: -1137344530773526120}
|
||||
- component: {fileID: 7678745961864154063}
|
||||
m_Layer: 0
|
||||
m_Name: Ship
|
||||
m_TagString: Untagged
|
||||
|
@ -420,6 +421,14 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!81 &7678745961864154063
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 0
|
||||
--- !u!1 &100002
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1093,7 +1093,6 @@ GameObject:
|
|||
- component: {fileID: 1667533374}
|
||||
- component: {fileID: 1667533373}
|
||||
- component: {fileID: 1667533371}
|
||||
- component: {fileID: 1667533370}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
|
@ -1101,14 +1100,6 @@ GameObject:
|
|||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1667533370
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1667533368}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &1667533371
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ShipControl : NetworkBehaviour
|
|||
|
||||
public override void NetworkStart()
|
||||
{
|
||||
GetComponent<AudioListener>().enabled = true;
|
||||
GetComponent<AudioListener>().enabled = IsOwner;
|
||||
}
|
||||
|
||||
public void TakeDamage(int amount)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
- Removed empty MonoBehaviours which were used as tags and using the Unity tag system instead.
|
||||
- Removed the dependency to the community contributions repository and copied `NetworkManagerHud` and `NetworkObjectPool` into the sample.
|
||||
- Small QoL improvements to scripting. Using `TryGetComponent` and `CompareTag`.
|
||||
- Fix audio issues by moving the audio listener onto the player ship object.
|
||||
|
||||
#### Known Issues
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче