- Home /
Android SystemInfo not working as intended?
In the Unity Scripting API https://docs.unity3d.com/ScriptReference/SystemInfo-processorType.html it says (at the bottom) that prior to 2019.3 it would return the architecture instead of the processor actual name. However, I am using 2019.3 and it still returns "ARM64 FP ASIMD AES" when I use SystemInfo.processorType. I tried another phone (with a different processor) and it returned the exact same thing. Is this a bug or am I doing something wrong?
Answer by stargamingentertainment · May 03, 2020 at 08:33 PM
Here to any that looks at this, heres a link and now works docs.unity3d.com/ScriptReference/SystemInfo-processorType
The code from the docs, just incase link changes.
using UnityEngine;
using System;
using System.Globalization;
public class Example : MonoBehaviour
{
void Start()
{
// Prints using the following format - "Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz"
print(SystemInfo.processorType);
// Print out the architecture of the running process.
// We can use the Environment property Is64BitProcess along with SystemInfo.processorType to figure it out.
// Do a case insensitive string check.
if (CultureInfo.InvariantCulture.CompareInfo.IndexOf(SystemInfo.processorType, "ARM", CompareOptions.IgnoreCase) >= 0)
{
if (Environment.Is64BitProcess)
Debug.Log("ARM64");
else
Debug.Log("ARM");
}
else
{
// Must be in the x86 family.
if (Environment.Is64BitProcess)
Debug.Log("x86_64");
else
Debug.Log("x86");
}
}
}
Your answer
Follow this Question
Related Questions
Problem with Gyro in Unity Android project 1 Answer
TimeZoneInfo.GetSystemTimeZones().Count gives 0 for unity android app 0 Answers
What is the DeviceType reported for an Ouya? 1 Answer
Does SystemInfo.deviceUniqueIdentifier really need permission in Android? 1 Answer
iOS - SystemInfo : Appropriate use? 0 Answers