@@ -134,28 +134,19 @@ public static void BuildMacIl2CPPPlayer()
134
134
public static void BuildLinuxIl2CPPPlayer ( )
135
135
{
136
136
Debug . Log ( "Builder: Building Linux IL2CPP Player" ) ;
137
- PlayerSettings . SetUseDefaultGraphicsAPIs ( BuildTarget . StandaloneLinux64 , false ) ;
138
- PlayerSettings . SetGraphicsAPIs ( BuildTarget . StandaloneLinux64 , new [ ] { UnityEngine . Rendering . GraphicsDeviceType . OpenGLCore } ) ;
139
- PlayerSettings . gpuSkinning = false ;
140
- PlayerSettings . graphicsJobs = false ;
137
+ SetGraphicsApiToOpenGLCore ( BuildTarget . StandaloneLinux64 ) ;
141
138
BuildIl2CPPPlayer ( BuildTarget . StandaloneLinux64 , BuildTargetGroup . Standalone , BuildOptions . StrictMode ) ;
142
139
}
143
140
public static void BuildAndroidIl2CPPPlayer ( )
144
141
{
145
142
Debug . Log ( "Builder: Building Android IL2CPP Player" ) ;
146
- PlayerSettings . SetUseDefaultGraphicsAPIs ( BuildTarget . Android , false ) ;
147
- PlayerSettings . SetGraphicsAPIs ( BuildTarget . Android , new [ ] { UnityEngine . Rendering . GraphicsDeviceType . OpenGLCore } ) ;
148
- PlayerSettings . gpuSkinning = false ;
149
- PlayerSettings . graphicsJobs = false ;
143
+ SetGraphicsApiToOpenGLCore ( BuildTarget . Android ) ;
150
144
BuildIl2CPPPlayer ( BuildTarget . Android , BuildTargetGroup . Android , BuildOptions . StrictMode ) ;
151
145
}
152
146
public static void BuildAndroidIl2CPPProject ( )
153
147
{
154
148
Debug . Log ( "Builder: Building Android IL2CPP Project" ) ;
155
- PlayerSettings . SetUseDefaultGraphicsAPIs ( BuildTarget . Android , false ) ;
156
- PlayerSettings . SetGraphicsAPIs ( BuildTarget . Android , new [ ] { UnityEngine . Rendering . GraphicsDeviceType . OpenGLCore } ) ;
157
- PlayerSettings . gpuSkinning = false ;
158
- PlayerSettings . graphicsJobs = false ;
149
+ SetGraphicsApiToOpenGLCore ( BuildTarget . Android ) ;
159
150
EditorUserBuildSettings . exportAsGoogleAndroidProject = true ;
160
151
BuildIl2CPPPlayer ( BuildTarget . Android , BuildTargetGroup . Android , BuildOptions . AcceptExternalModificationsToPlayer ) ;
161
152
}
@@ -171,6 +162,14 @@ public static void BuildWebGLPlayer()
171
162
BuildIl2CPPPlayer ( BuildTarget . WebGL , BuildTargetGroup . WebGL , BuildOptions . StrictMode ) ;
172
163
}
173
164
165
+ public static void SetGraphicsApiToOpenGLCore ( BuildTarget target )
166
+ {
167
+ PlayerSettings . SetUseDefaultGraphicsAPIs ( target , false ) ;
168
+ PlayerSettings . SetGraphicsAPIs ( target , new [ ] { UnityEngine . Rendering . GraphicsDeviceType . OpenGLCore } ) ;
169
+ PlayerSettings . gpuSkinning = false ;
170
+ PlayerSettings . graphicsJobs = false ;
171
+ }
172
+
174
173
public static Dictionary < string , string > ParseCommandLineArguments ( )
175
174
{
176
175
Debug . Log ( "Builder: Parsing command line arguments" ) ;
0 commit comments