NoaInformation
Through this class, you can get the information of the Information function.
APIs
Static Methods
API | Description |
---|---|
GetCustomInformationValue(keyName) | Retrieves the value associated with the specified key from the custom data. |
GetCustomInformationGroup(groupName) | Retrieves group information that matches the specified group name from the custom data. |
GetCustomInformationAll() | Retrieves all custom data. |
Static Properties
API | Description |
---|---|
SystemInformation | Returns the system information the tool retains. |
UnityInformation | Returns the Unity information the tool retains. |
OnDownload | This event is triggered when information is downloaded. If the event handler returns true, the information will be downloaded locally. If the event handler returns false, the information will not be downloaded. |
Sample Code
using UnityEngine;
#if NOA_DEBUGGER
using NoaDebugger;
#endif
public class Example
{
void ExampleMethod()
{
#if NOA_DEBUGGER
// Get the system information.
SystemInformation systemInfo = NoaInformation.SystemInformation;
ApplicationInfo appInfo = systemInfo.ApplicationInfo;
DeviceInfo deviceInfo = systemInfo.DeviceInfo;
CpuInfo cpuInfo = systemInfo.CpuInfo;
GpuInfo gpuInfo = systemInfo.GpuInfo;
SystemMemoryInfo systemMemoryInfo = systemInfo.SystemMemoryInfo;
DisplayInfo displayInfo = systemInfo.DisplayInfo;
// Get the Unity information.
UnityInformation unityInfo = NoaInformation.UnityInformation;
UnityInfo unity = unityInfo.UnityInfo;
RuntimeInfo runtime = unityInfo.RuntimeInfo;
FeaturesInfo features = unityInfo.FeaturesInfo;
GraphicsInfo graphics = unityInfo.GraphicsInfo;
// Set up the event that is triggered when information is downloaded.
NoaInformation.OnDownload += (string filename, string jsonData) =>
{
Debug.Log($"Information download. Filename: {filename}");
// Return true to allow local download
// Return false to prevent local download
return true;
};
// Retrieve custom data.
string customValue = NoaInformation.GetCustomInformationValue(keyName: "SampleKey");
// Retrieve custom data for each group.
NoaCustomInformationGroup groupInfo = NoaInformation.GetCustomInformationGroup(groupName: "SampleGroup");
// Retrieve all custom data.
List<NoaCustomInformationGroup> allGroups = NoaInformation.GetCustomInformationAll();
#endif
}
}