/** * This method returns the event in an updated .fev asset file that matches an event from the previous * version of that .fev asset file. * The matching is based on the GUID first, then the path through event groups and the name of the event. * Returns the event or null if no match could be found. */ public FmodEvent getMatchingEvent(FmodEvent oldEvent) { string guidString = oldEvent.getGUIDString(); if (guidString != "" && guidString != FmodEvent.EMPTY_GUIDSTRING) { foreach (FmodEvent e in m_events) { if (e.WasLoaded() && e.getGUIDString() != "" && e.getGUIDString() != FmodEvent.EMPTY_GUIDSTRING) { if (e.getGUIDString() == guidString) { return(e); } } } } string fullName = oldEvent.getFullName(); foreach (FmodEvent e in m_events) { string tmp = e.getFullName(); if (e.WasLoaded() && tmp == fullName) { return(e); } } return(null); }
private FMOD.RESULT _loadEvent(FmodEvent evt, ref FMOD.Event fmodEvent) { string guidString = evt.getGUIDString(); FMOD.RESULT result = FMOD.RESULT.OK; if (guidString != FmodEvent.EMPTY_GUIDSTRING) { result = getEventSystem().getEventByGUIDString(guidString, FMOD.EVENT_MODE.DEFAULT | FMOD.EVENT_MODE.ERROR_ON_DISKACCESS, ref fmodEvent); } else { string fullName = evt.getFullName(); result = getEventSystem().getEvent(fullName, FMOD.EVENT_MODE.DEFAULT | FMOD.EVENT_MODE.ERROR_ON_DISKACCESS, ref fmodEvent); } return(result); }
private FMOD.RESULT _loadEvent(FmodEvent evt, ref FMOD.Event fmodEvent) { string guidString = evt.getGUIDString(); FMOD.RESULT result = FMOD.RESULT.OK; if (guidString != FmodEvent.EMPTY_GUIDSTRING) { result = getEventSystem().getEventByGUIDString(guidString, FMOD.EVENT_MODE.DEFAULT | FMOD.EVENT_MODE.ERROR_ON_DISKACCESS, ref fmodEvent); } else { string fullName = evt.getFullName(); result = getEventSystem().getEvent(fullName, FMOD.EVENT_MODE.DEFAULT | FMOD.EVENT_MODE.ERROR_ON_DISKACCESS, ref fmodEvent); } return (result); }
/** * This method returns the event in an updated .fev asset file that matches an event from the previous * version of that .fev asset file. * The matching is based on the GUID first, then the path through event groups and the name of the event. * Returns the event or null if no match could be found. */ public FmodEvent getMatchingEvent(FmodEvent oldEvent) { string guidString = oldEvent.getGUIDString(); if (guidString != "" && guidString != FmodEvent.EMPTY_GUIDSTRING) { foreach (FmodEvent e in m_events) { if (e.WasLoaded() && e.getGUIDString() != "" && e.getGUIDString() != FmodEvent.EMPTY_GUIDSTRING) { if (e.getGUIDString() == guidString) { return (e); } } } } string fullName = oldEvent.getFullName(); foreach (FmodEvent e in m_events) { string tmp = e.getFullName(); if (e.WasLoaded() && tmp == fullName) { return (e); } } return (null); }