sound occlusion first results, next - layer assignment
This commit is contained in:
@@ -501,6 +501,7 @@ GameObject:
|
||||
- component: {fileID: 7229210520247497862}
|
||||
- component: {fileID: 4682670891357688467}
|
||||
- component: {fileID: 2457808414162356797}
|
||||
- component: {fileID: 4431907602736002208}
|
||||
m_Layer: 0
|
||||
m_Name: XR Origin
|
||||
m_TagString: Player
|
||||
@@ -618,6 +619,20 @@ MonoBehaviour:
|
||||
TeleportRayLine: {fileID: 4167169049726400930}
|
||||
defaultGravity: {fileID: 5354856814699964556}
|
||||
isInSpace: 0
|
||||
--- !u!114 &4431907602736002208
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 916340287994646858}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86c6556701af9e04380698b89f691b6e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nonRigidbodyVelocity: 0
|
||||
attenuationObject: {fileID: 916340287994646858}
|
||||
--- !u!1 &1084917492538600974
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4392,8 +4407,8 @@ GameObject:
|
||||
- component: {fileID: 6243020581121736520}
|
||||
- component: {fileID: 1248243081272065818}
|
||||
- component: {fileID: 7904742026328308208}
|
||||
- component: {fileID: 438034309889585932}
|
||||
- component: {fileID: 5359875513008250733}
|
||||
- component: {fileID: 438034309889585932}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@@ -4630,20 +4645,6 @@ MonoBehaviour:
|
||||
mipBias: 0
|
||||
varianceClampScale: 0.9
|
||||
contrastAdaptiveSharpening: 0
|
||||
--- !u!114 &438034309889585932
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6810398627900972352}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86c6556701af9e04380698b89f691b6e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nonRigidbodyVelocity: 0
|
||||
attenuationObject: {fileID: 0}
|
||||
--- !u!135 &5359875513008250733
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4665,6 +4666,20 @@ SphereCollider:
|
||||
serializedVersion: 3
|
||||
m_Radius: 0.1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &438034309889585932
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6810398627900972352}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86c6556701af9e04380698b89f691b6e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nonRigidbodyVelocity: 0
|
||||
attenuationObject: {fileID: 0}
|
||||
--- !u!1 &6839907377310123617
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1692,7 +1692,7 @@ GameObject:
|
||||
- component: {fileID: 150987804393607111}
|
||||
- component: {fileID: 2849620166313326850}
|
||||
- component: {fileID: 3623653364064856318}
|
||||
- component: {fileID: 7426565597011524732}
|
||||
- component: {fileID: 6605356447225771655}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkManagerUI
|
||||
m_TagString: Untagged
|
||||
@@ -1791,7 +1791,7 @@ AudioListener:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8920648335286241163}
|
||||
m_Enabled: 1
|
||||
--- !u!114 &7426565597011524732
|
||||
--- !u!114 &6605356447225771655
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -1800,16 +1800,15 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 8920648335286241163}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 891e12d2218566241a2acd395d5d3892, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 0be1f6fa249e2b74d80c57af214b930d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
VRToggle: {fileID: 48284653022802127}
|
||||
VRToggle: {fileID: 0}
|
||||
startPlayingButton: {fileID: 4409105029378525441}
|
||||
reloadButton: {fileID: 3248072787155925101}
|
||||
joinMultiplayerButton: {fileID: 7057699864170177475}
|
||||
serverListContainer: {fileID: 1182580605524482518}
|
||||
IPButton: {fileID: 8155264290485183093, guid: 161eef8a6244baa46b0988be67d74a08,
|
||||
type: 3}
|
||||
serverListContainer: {fileID: 6604224998162932651}
|
||||
IPButton: {fileID: 8799561993934626415}
|
||||
statusText: {fileID: 2762709333159616741}
|
||||
quitButton: {fileID: 856744223094475457}
|
||||
networkDiscovery: {fileID: 0}
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using FMODUnity;
|
||||
using FMOD.Studio;
|
||||
using System.Collections;
|
||||
|
||||
public class FirstPersonOcclusion : MonoBehaviour
|
||||
{
|
||||
@@ -28,7 +29,7 @@ public class FirstPersonOcclusion : MonoBehaviour
|
||||
private float lineCastHitCount = 0f;
|
||||
private Color colour;
|
||||
|
||||
private void Start()
|
||||
private IEnumerator Start()
|
||||
{
|
||||
Debug.Log("--- Start Method ---");
|
||||
|
||||
@@ -54,21 +55,17 @@ public class FirstPersonOcclusion : MonoBehaviour
|
||||
Debug.Log($"FMOD Event Min/Max Distance: {minDistance:F2} / {MaxDistance:F2}");
|
||||
|
||||
// 6. Finding Listener
|
||||
yield return new WaitUntil(() => FindObjectOfType<StudioListener>() != null);
|
||||
Listener = FindObjectOfType<StudioListener>();
|
||||
if (Listener != null)
|
||||
{
|
||||
Debug.Log($"Found FMOD StudioListener on GameObject: {Listener.gameObject.name}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("FATAL: Could not find FMOD StudioListener in the scene!");
|
||||
}
|
||||
Debug.Log($"FMOD StudioListener found on {Listener.gameObject.name}");
|
||||
|
||||
Debug.Log("--- End Start Method ---");
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
// Debug.Log("--- FixedUpdate Method ---"); // Too frequent, only log conditions
|
||||
if (Listener == null) return; // Skip until listener exists
|
||||
|
||||
AudioOccluded.isVirtual(out AudioIsVirtual);
|
||||
AudioOccluded.getPlaybackState(out pb);
|
||||
|
||||
@@ -4,7 +4,7 @@ MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
executionOrder: 300
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
Reference in New Issue
Block a user