public List <FmodEvent> loadEventsFromFile(string assetPath, string assetName, FmodEventAsset asset) { FMOD.EventGroup eventgroup = null; FMOD.RESULT result = FMOD.RESULT.OK; List <FmodEvent> events = new List <FmodEvent>(); List <FmodEventGroup> eventGroups = new List <FmodEventGroup>(); int numGroups = 0; FmodEventGroup toAdd = null; FMOD.EVENT_LOADINFO loadInfo = new FMOD.EVENT_LOADINFO(); FMOD.EventProject project = null; _loadFile(assetPath, assetName, ref loadInfo, ref project); _getSoundBankNames(asset); FMOD.EVENT_PROJECTINFO projectInfo = new FMOD.EVENT_PROJECTINFO(); project.getInfo(ref projectInfo); asset.setProjectName(new string(projectInfo.name)); result = project.getNumGroups(ref numGroups); ERRCHECK(result); for (int i = 0; i < numGroups; i++) { result = project.getGroupByIndex(i, false, ref eventgroup); ERRCHECK(result); toAdd = FmodEventGroup.CreateInstance("FmodEventGroup") as FmodEventGroup; toAdd.Initialize(eventgroup, null, asset); eventGroups.Add(toAdd); events.AddRange(toAdd.getAllEvents()); } asset.setEventGroups(eventGroups); loadReverbsFromFile(asset); return(events); }