public override int GetHashCode() { int hash1 = PluginID?.GetHashCode() ?? 0; int hash2 = Title?.GetHashCode() ?? 0; int hash3 = SubTitle?.GetHashCode() ?? 0; int hashcode = hash1 ^ hash2 ^ hash3; return(hashcode); }
private static System.Collections.Generic.HashSet <AkPluginInfo> ParsePluginsXML(string platform, System.Collections.Generic.List <string> in_pluginFiles) { var newPlugins = new System.Collections.Generic.HashSet <AkPluginInfo>(); foreach (var pluginFile in in_pluginFiles) { if (!System.IO.File.Exists(pluginFile)) { continue; } try { var doc = new System.Xml.XmlDocument(); doc.Load(pluginFile); var Navigator = doc.CreateNavigator(); var pluginInfoNode = Navigator.SelectSingleNode("//PluginInfo"); var boolMotion = pluginInfoNode.GetAttribute("Motion", ""); var it = Navigator.Select("//Plugin"); if (boolMotion == "true") { AkPluginInfo motionPluginInfo = new AkPluginInfo(); motionPluginInfo.DllName = "AkMotion"; newPlugins.Add(motionPluginInfo); } foreach (System.Xml.XPath.XPathNavigator node in it) { var rawPluginID = uint.Parse(node.GetAttribute("ID", "")); if (rawPluginID == 0) { continue; } PluginID pluginID = (PluginID)rawPluginID; if (alwaysSkipPluginsIDs.Contains(pluginID)) { continue; } var dll = string.Empty; if (platform == "Switch") { if (pluginID == PluginID.AkMeter) { dll = "AkMeter"; } } else if (builtInPluginIDs.Contains(pluginID)) { continue; } if (string.IsNullOrEmpty(dll)) { dll = node.GetAttribute("DLL", ""); } AkPluginInfo newPluginInfo = new AkPluginInfo(); newPluginInfo.PluginID = rawPluginID; newPluginInfo.DllName = dll; if (!PluginIDToStaticLibName.TryGetValue(pluginID, out newPluginInfo.StaticLibName)) { newPluginInfo.StaticLibName = dll; } newPlugins.Add(newPluginInfo); } } catch (System.Exception ex) { UnityEngine.Debug.LogError("WwiseUnity: " + pluginFile + " could not be parsed. " + ex.Message); } } return(newPlugins); }
protected abstract void OnReceiveMessage(PluginID pluginId, int message, IntPtr param);
public void ReceiveMessage(PluginID pluginId, int message, IntPtr param) { OnReceiveMessage(pluginId, message, param); }
protected override void OnReceiveMessage(PluginID pluginId, int message, IntPtr param) { }
protected override void OnReceiveMessage(PluginID pluginId, int message, IntPtr param) { XPlane.Trace.WriteLine($"Received message {message} from plugin {pluginId} with payload 0x{param.ToInt64():X8}."); }