add the connection with the editor and can test the json now

This commit is contained in:
FloatGaming
2025-11-03 16:12:22 +08:00
parent 98510eef0f
commit 4ebe6183d3
57 changed files with 3287 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3463f5674d9c00b448cc181297d8dfa1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+35
View File
@@ -0,0 +1,35 @@
using UnityEngine;
public class OpAudioPlayer : MonoBehaviour
{
public AudioSource audioSource;
void Start()
{
if (audioSource == null)
{
audioSource = GetComponent<AudioSource>();
if (audioSource == null)
{
Debug.LogError("OpAudioPlayer: 找不到 AudioSource 组件。请确保组件已添加或在 Inspector 中设置。");
return;
}
}
audioSource.loop = true;
if (!audioSource.isPlaying)
{
audioSource.Play();
}
}
private void OnDestroy()
{
if (audioSource != null && audioSource.isPlaying)
{
audioSource.Stop();
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 59b3d914c9079bd419564b0a7c611bed
@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 8ed30022249917f4fb5c65d026b896d6
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant: