1
0
forked from cgvr/DeltaVR

FMODi paigaldamine projekti sisse, fmod project created, assets are imported into FMOD; AudioManager and FMODEvents scripts, VR is set up

This commit is contained in:
Timur Nizamov
2025-10-12 20:57:56 +03:00
parent cb73b9cbbc
commit f542c4c57e
770 changed files with 47580 additions and 3 deletions

View File

@@ -0,0 +1,53 @@
using System;
using UnityEngine;
namespace FMODUnity
{
[Serializable]
public struct EventReference
{
public FMOD.GUID Guid;
#if UNITY_EDITOR
public string Path;
public static Func<string, FMOD.GUID> GuidLookupDelegate;
public override string ToString()
{
return string.Format("{0} ({1})", Guid, Path);
}
public bool IsNull
{
get
{
return string.IsNullOrEmpty(Path) && Guid.IsNull;
}
}
public static EventReference Find(string path)
{
if (GuidLookupDelegate == null)
{
throw new InvalidOperationException("EventReference.Find called before EventManager was initialized");
}
return new EventReference { Path = path, Guid = GuidLookupDelegate(path) };
}
#else
public override string ToString()
{
return Guid.ToString();
}
public bool IsNull
{
get
{
return Guid.IsNull;
}
}
#endif
}
}