public static void RegisterPortal(AkRoomPortal portal) { if (!m_Portals.Contains(portal)) { m_Portals.Add(portal); } }
public static void RegisterPortalUpdate(AkRoomPortal portal) { if (!m_PortalsToUpdate.Contains(portal)) { m_PortalsToUpdate.Add(portal); } }
public static void UnregisterPortal(AkRoomPortal portal) { if (m_Instance != null) { m_Instance.m_Portals.Remove(portal); m_Instance.m_PortalsToUpdate.Remove(portal); } }
private void OnEnable() { initialState = serializedObject.FindProperty("initialState"); rooms = serializedObject.FindProperty("rooms"); m_OpenPortalEventHandlerInspector.Init(serializedObject, "triggerList", "Open On: ", false); m_ClosePortalEventHandlerInspector.Init(serializedObject, "closePortalTriggerList", "Close On: ", false); m_roomPortal = target as AkRoomPortal; }
public static void RegisterPortalUpdate(AkRoomPortal portal) { if (m_Instance != null) { if (m_Instance.m_Portals.Contains(portal) && !m_Instance.m_PortalsToUpdate.Contains(portal)) { m_Instance.m_PortalsToUpdate.Add(portal); } } }
public static void UnregisterPortal(AkRoomPortal portal) { if (m_Portals.Contains(portal)) { m_Portals.Remove(portal); } if (m_PortalsToUpdate.Contains(portal)) { m_PortalsToUpdate.Remove(portal); } }
private void OnEnable() { m_OpenPortalEventHandlerInspector.Init(serializedObject, "triggerList", "Open On: ", false); m_ClosePortalEventHandlerInspector.Init(serializedObject, "closePortalTriggerList", "Close On: ", false); m_roomPortal = target as AkRoomPortal; m_roomPortal.FindOverlappingRooms(roomList); for (var i = 0; i < 2; i++) { var index = roomList[i].BinarySearch(m_roomPortal.GetRoom(i)); m_selectedIndex[i] = index == -1 ? 0 : index; } }
void OnEnable() { m_OpenPortalEventHandlerInspector.Init(serializedObject, "triggerList", "Open On: ", false); m_ClosePortalEventHandlerInspector.Init(serializedObject, "closePortalTriggerList", "Close On: ", false); m_roomPortal = target as AkRoomPortal; FindOverlappingRooms(); for (int i = 0; i < 2; i++) { int index = m_roomPortal.roomList[i].list.IndexOf(m_roomPortal.rooms[i]); m_selectedIndex[i] = index == -1 ? 0 : index; } }
public static void RoomCheck(AkRoomPortal portal) { if (AkWwiseEditorSettings.Instance.ShowSpatialAudioWarningMsg) { if (!portal.IsValid) { UnityEngine.GUILayout.Space(UnityEditor.EditorGUIUtility.standardVerticalSpacing); UnityEditor.EditorGUILayout.HelpBox( "Front and back rooms are identical. The AkRoomPortal will not be sent to Spatial Audio.", UnityEditor.MessageType.Warning); } } }
private void Awake() { InitIntervalsAndFadeRates(); m_portal = GetComponent <AkRoomPortal>(); }
private void Start() { akportal = portal.GetComponent <AkRoomPortal>(); }