private void OnDrawGizmosSelected() { if (!enabled) { return; } AkAmbient Ambient = GetComponent <AkAmbient>(); bool showSpheres = true; if (Ambient && Ambient.multiPositionTypeLabel == MultiPositionTypeLabel.Large_Mode) { showSpheres = false; } if (showSpheres) { UnityEngine.Color SphereColor = UnityEngine.Color.yellow; SphereColor.a = 0.25f; UnityEngine.Gizmos.color = SphereColor; UnityEngine.Gizmos.DrawSphere(gameObject.transform.position, innerRadius); UnityEngine.Gizmos.DrawSphere(gameObject.transform.position, outerRadius); } }
void CreateAmbient(AkDragDropData DDData) { AkAmbient ambient = Undo.AddComponent <AkAmbient>(gameObject); if (ambient != null) { SetTypeValue(ref ambient.valueGuid, ref ambient.eventID, DDData); } }
void CreateAmbient(Guid componentGuid, int ID) { AkAmbient ambient = Undo.AddComponent <AkAmbient>(gameObject); if (ambient != null) { ambient.valueGuid = componentGuid.ToByteArray(); ambient.eventID = ID; } }
void CreateAmbient(string componentGuid, int ID) { AkAmbient ambient = Undo.AddComponent <AkAmbient>(gameObject); if (ambient != null) { ambient.valueGuid = new System.Guid(componentGuid).ToByteArray(); ambient.eventID = ID; } }
private new void OnEnable() { base.OnEnable(); m_AkAmbient = target as AkAmbient; multiPositionType = serializedObject.FindProperty("multiPositionTypeLabel"); DefaultHandles.Hidden = hideDefaultHandle; if (!attSphereProperties.ContainsKey(target)) { attSphereProperties.Add(target, AttenuationSphereOptions.Dont_Show); } currentAttSphereOp = attSphereProperties[target]; AkWwiseXMLWatcher.Instance.XMLUpdated += PopulateMaxAttenuation; }
new void OnEnable() { base.OnEnable (); m_AkAmbient = target as AkAmbient; multiPositionType = serializedObject.FindProperty("multiPositionTypeLabel"); DefaultHandles.Hidden = hideDefaultHandle; if(!attSphereProperties.ContainsKey(target.GetInstanceID())) attSphereProperties.Add(target.GetInstanceID(), AttenuationSphereOptions.Dont_Show); currentAttSphereOp = attSphereProperties [target.GetInstanceID ()]; AkWwiseXMLWatcher.GetInstance ().StartXMLWatcher (); EditorApplication.update += PopulateMaxAttenuation; }
public new void OnEnable() { base.OnEnable(); m_AkAmbient = target as AkAmbient; multiPositionTypeProperty = serializedObject.FindProperty("multiPositionTypeLabel"); largeModePositionArrayProperty = serializedObject.FindProperty("LargeModePositions"); if (!attSphereProperties.ContainsKey(target)) { attSphereProperties.Add(target, AttenuationSphereOptions.Dont_Show); } currentAttSphereOp = attSphereProperties[target]; AkWwiseXMLWatcher.Instance.XMLUpdated += PopulateMaxAttenuation; }
private new void OnEnable() { base.OnEnable(); m_AkAmbient = target as AkAmbient; multiPositionType = serializedObject.FindProperty("multiPositionTypeLabel"); DefaultHandles.Hidden = hideDefaultHandle; if (!attSphereProperties.ContainsKey(target.GetInstanceID())) { attSphereProperties.Add(target.GetInstanceID(), AttenuationSphereOptions.Dont_Show); } currentAttSphereOp = attSphereProperties[target.GetInstanceID()]; AkWwiseXMLWatcher.GetInstance().StartXMLWatcher(); UnityEditor.EditorApplication.update += PopulateMaxAttenuation; }
void Awake() { akAmbient = GetComponent <AkAmbient>(); _prevPosition = transform.position; }
void SetMultiPosTrigger(AkAmbient[] akAmbients) { for(int i = 0; i < akAmbients.Length; i++) { if(akAmbients[i].multiPositionTypeLabel == MultiPositionTypeLabel.MultiPosition_Mode && akAmbients[i].eventID == m_AkAmbient.eventID) { akAmbients[i].triggerList = m_AkAmbient.triggerList; } } }