コード例 #1
0
        public static void GetPSS()
        {
            memoryDict.Clear();
            memoryDict["battery"] = SystemInfo.batteryLevel.ToString();
            UPROpen.SendCustomizedData("batteryHome", "batteryChart", "line", memoryDict);

            memoryDict.Clear();
            memoryDict["cpuTemp"] = intent.Call <int>("getIntExtra", tempeartureModel).ToString();
            UPROpen.SendCustomizedData("batteryHome", "tempChart", "line", memoryDict);
        }
コード例 #2
0
        IEnumerator GetWWise(object wWiseSummaryInstance, Type soundEngineClass, object soundEngineInstance)
        {
            MethodInfo     getSummary     = soundEngineClass.GetMethod("GetResourceMonitorDataSummary");
            WaitForSeconds waitOneSeconds = new WaitForSeconds(1);

            wwiseDict = new Dictionary <string, string>();
            while (true)
            {
                Profiler.BeginSample("Profiler.GetWWiseInfo");
                if (NetworkServer.isConnected)
                {
                    try
                    {
                        getSummary.Invoke(soundEngineInstance, new object[] { wWiseSummaryInstance });
                        wwiseDict.Clear();
                        wwiseDict["CPU"]       = GetPropValue(wWiseSummaryInstance, "totalCPU").ToString();
                        wwiseDict["pluginCPU"] = GetPropValue(wWiseSummaryInstance, "pluginCPU").ToString();
                        UPROpen.SendCustomizedData("wWise", "wWiseCPU", "line", wwiseDict);

                        wwiseDict.Clear();
                        wwiseDict["voice"]         = GetPropValue(wWiseSummaryInstance, "totalVoices").ToString();
                        wwiseDict["virtualVoice"]  = GetPropValue(wWiseSummaryInstance, "virtualVoices").ToString();
                        wwiseDict["physicalVoice"] = GetPropValue(wWiseSummaryInstance, "physicalVoices").ToString();
                        UPROpen.SendCustomizedData("wWise", "wWiseVoice", "line", wwiseDict);

                        wwiseDict.Clear();
                        wwiseDict["events"] = GetPropValue(wWiseSummaryInstance, "nbActiveEvents").ToString();
                        UPROpen.SendCustomizedData("wWise", "wWiseEvents", "line", wwiseDict);
                    }
                    catch (Exception ex)
                    {
                        Debug.LogError("[PACKAGE] Send WWise Error " + ex);
                    }
                }
                Profiler.EndSample();
                yield return(waitOneSeconds);
            }
        }