28 lines
795 B
Java
28 lines
795 B
Java
package com.x.gamesdk;
|
|
|
|
import com.unity3d.player.UnityPlayerActivity;
|
|
import android.os.Bundle;
|
|
import android.os.Build;
|
|
|
|
public class GameActivity extends UnityPlayerActivity {
|
|
|
|
private String appendCommandLineArgument(String cmdLine, String arg) {
|
|
if (arg == null || arg.isEmpty())
|
|
return cmdLine;
|
|
else if (cmdLine == null || cmdLine.isEmpty())
|
|
return arg;
|
|
else
|
|
return cmdLine + " " + arg;
|
|
}
|
|
|
|
@Override protected String updateUnityCommandLineArguments(String cmdLine)
|
|
{
|
|
return cmdLine; // 让 Unity 根据 PlayerSettings 选择图形 API
|
|
}
|
|
|
|
@Override protected void onCreate(Bundle savedInstanceState)
|
|
{
|
|
super.onCreate(savedInstanceState);
|
|
new GameSdk(getBaseContext());
|
|
}
|
|
} |