Skip to content

Instantly share code, notes, and snippets.

@adamtuliper
Created October 27, 2015 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamtuliper/aa620823a56585be97fd to your computer and use it in GitHub Desktop.
Save adamtuliper/aa620823a56585be97fd to your computer and use it in GitHub Desktop.
using System;
using UnityEngine;
using System.Collections;
using UnityEditor;
using UnityEngine.Rendering;
//Dumps the default Graphics Api selection for a particular platform in Unity
public class DumpGraphicsApi : MonoBehaviour
{
// Use this for initialization
void Start()
{
var values = Enum.GetValues(typeof(BuildTarget));
foreach (int value in values)
{
var graphicsApis = PlayerSettings.GetGraphicsAPIs(((BuildTarget)value));
string platform = Enum.GetName(typeof(BuildTarget), (int)value);
foreach (GraphicsDeviceType graphicsDeviceType in graphicsApis)
{
string graphicsDeviceName = Enum.GetName(typeof(GraphicsDeviceType), graphicsDeviceType);
Debug.Log(string.Format("Platform: {0} Graphics API: {1}", platform,
Enum.GetName(typeof(GraphicsDeviceType), (int)graphicsDeviceType)));
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment