Created
October 27, 2015 17:27
-
-
Save adamtuliper/aa620823a56585be97fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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