namespace XGame.Editor.Build
{
    /// <summary>
    /// 摘要: Scripting implementation (backend).
    /// </summary>
    public enum ScriptingImplementation
    {
        /// <summary>
        /// Unity's .NET runtime.
        /// 这里将IL2CPP设置为零，打包时默认为IL2CPP
        /// </summary>
        IL2CPP = 0,
        //
        // 摘要:
        //     The standard Mono 2.6 runtime.
        Mono2x = 1,
        //
        // 摘要:
        //     Microsoft's .NET runtime.
        //WinRTDotNET = 3

    }
    public static class ScriptingImplementationExt
    {
        public static UnityEditor.ScriptingImplementation ToUnityImpl(this ScriptingImplementation implementation)
        {
            switch (implementation)
            {
                case ScriptingImplementation.Mono2x:
                    return UnityEditor.ScriptingImplementation.Mono2x;
                case ScriptingImplementation.IL2CPP:
                    return UnityEditor.ScriptingImplementation.IL2CPP;
                default:
                    throw new System.NotImplementedException();
            }
        }
    }
}
