bad-piggies-0.1.3-porting/Assets/Scripts/Assembly-CSharp/DeviceDependency.cs
2024-02-24 22:40:44 -05:00

25 lines
525 B
C#

using UnityEngine;
public class DeviceDependency : MonoBehaviour
{
[SerializeField]
private DeviceInfo.DeviceFamily[] enabledOnDevices;
private void Start()
{
DeviceInfo.DeviceFamily activeDeviceFamily = DeviceInfo.Instance.ActiveDeviceFamily;
bool flag = false;
DeviceInfo.DeviceFamily[] array = enabledOnDevices;
foreach (DeviceInfo.DeviceFamily deviceFamily in array)
{
if (activeDeviceFamily == deviceFamily)
{
flag = true;
}
}
if (!flag)
{
Object.Destroy(base.gameObject);
}
}
}