package com.example.a12280.artest;
import com.unity3d.player.*;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
public class UnityPlayerActivity extends Activity
{
protected UnityPlayer mUnityPlayer; // don't change the name of this variable; referenced from native code
// Setup activity layout
@Override protected void onCreate(Bundle savedInstanceState)
{
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
getWindow().setFormat(PixelFormat.RGBX_8888); // <--- This makes xperia play happy
mUnityPlayer = new UnityPlayer(this);
setContentView(mUnityPlayer);
mUnityPlayer.requestFocus();
}
@Override protected void onNewIntent(Intent intent)
{
// To support deep linking, we need to make sure that the client can get access to
// the last sent intent. The clients access this through a JNI api that allows them
// to get the intent set on launch. To update that after launch we have to manually
// replace the intent with the one caught here.
setIntent(intent);
}
// Quit Unity
@Override protected void onDestroy ()
{
mUnityPlayer.quit();
super.onDestroy();
}
// Pause Unity
@Override protected void onPause()
{
super.onPause();
mUnityPlayer.pause();
}
// Resume Unity
@Override protected void onResume()
{
super.onResume();
mUnityPlayer.resume();
}
@Override protected void onStart()
{
super.onStart();
mUnityPlayer.start();
}
@Override protected void onStop()
{
super.onStop();
mUnityPlayer.stop();
}
// Low Memory Unity
@Override public void onLowMemory()
{
super.onLowMemory();
mUnityPlayer.lowMemory();
}
// Trim Memory Unity
@Override public void onTrimMemory(int level)
{
super.onTrimMemory(level);
if (level == TRIM_MEMORY_RUNNING_CRITICAL)
{
mUnityPlayer.lowMemory();
}
}
// This ensures the layout will be correct.
@Override public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
mUnityPlayer.configurationChanged(newConfig);
}
// Notify Unity of the focus change.
@Override public void onWindowFocusChanged(boolean hasFocus)
{
super.onWindowFocusChanged(hasFocus);
mUnityPlayer.windowFocusChanged(hasFocus);
}
// For some reason the multiple keyevent type is not supported by the ndk.
// Force event injection by overriding dispatchKeyEvent().
@Override public boolean dispatchKeyEvent(KeyEvent event)
{
if (event.getAction() == KeyEvent.ACTION_MULTIPLE)
return mUnityPlayer.injectEvent(event);
return super.dispatchKeyEvent(event);
}
// Pass any events not handled by (unfocused) views straight to UnityPlayer
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { return mUnityPlayer.injectEvent(event); }
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { return mUnityPlayer.injectEvent(event); }
@Override public boolean onTouchEvent(MotionEvent event) { return mUnityPlayer.injectEvent(event); }
/*API12*/ public boolean onGenericMotionEvent(MotionEvent event) { return mUnityPlayer.injectEvent(event); }
}
没有合适的资源?快使用搜索试试~ 我知道了~
Android插件化实现ar识别
共134个文件
dll:52个
png:17个
xml:14个
需积分: 50 45 下载量 93 浏览量
2017-12-06
17:05:03
上传
评论
收藏 100.32MB RAR 举报
温馨提示
基于EasyAr与Replugin实现android插件化实现吊起ar识别
资源推荐
资源详情
资源评论
收起资源包目录
Android插件化实现ar识别 (134个子文件)
17d5fa30757a4424da3c57bc5a4fa782 175KB
199c3f586b23b0e41b7936c238e2498a 4KB
5d7c7c1000bba8242b83ec2329d4a995 5KB
8e561bf182adda64b9da758504766a34 4KB
92a78d2c8858f904e9055e7052fa3cc3 4KB
globalgamemanagers.assets 28KB
c9535a34d6a760b48b742396b856c4ff 4KB
boot.config 0B
mscorlib.dll 2.38MB
System.dll 1.02MB
UnityEngine.CoreModule.dll 663KB
Mono.Security.dll 287KB
System.Core.dll 260KB
UnityEngine.Networking.dll 249KB
UnityEngine.UI.dll 243KB
UnityEngine.UIElementsModule.dll 163KB
UnityEngine.IMGUIModule.dll 137KB
EasyAR.Unity.dll 134KB
UnityEngine.ParticleSystemModule.dll 107KB
UnityEngine.Timeline.dll 85KB
UnityEngine.AnimationModule.dll 79KB
UnityEngine.Physics2DModule.dll 76KB
UnityEngine.UNETModule.dll 74KB
UnityEngine.PhysicsModule.dll 67KB
UnityEngine.AudioModule.dll 49KB
UnityEngine.dll 48KB
UnityEngine.UnityWebRequestModule.dll 35KB
UnityEngine.AIModule.dll 34KB
UnityEngine.WebModule.dll 29KB
UnityEngine.TerrainModule.dll 28KB
UnityEngine.TextRenderingModule.dll 25KB
UnityEngine.VRModule.dll 24KB
UnityEngine.GameCenterModule.dll 24KB
UnityEngine.ARModule.dll 23KB
UnityEngine.TilemapModule.dll 21KB
UnityEngine.UIModule.dll 20KB
UnityEngine.UnityWebRequestWWWModule.dll 18KB
UnityEngine.VideoModule.dll 17KB
UnityEngine.ParticlesLegacyModule.dll 15KB
Assembly-CSharp.dll 14KB
UnityEngine.UnityAnalyticsModule.dll 13KB
UnityEngine.InputModule.dll 13KB
UnityEngine.StyleSheetsModule.dll 12KB
UnityEngine.ClothModule.dll 11KB
UnityEngine.UnityConnectModule.dll 11KB
UnityEngine.VehiclesModule.dll 10KB
UnityEngine.GridModule.dll 10KB
UnityEngine.SpatialTracking.dll 9KB
UnityEngine.AccessibilityModule.dll 9KB
UnityEngine.DirectorModule.dll 9KB
UnityEngine.SpriteMaskModule.dll 8KB
UnityEngine.UnityWebRequestAudioModule.dll 8KB
UnityEngine.UnityWebRequestTextureModule.dll 8KB
UnityEngine.ImageConversionModule.dll 7KB
UnityEngine.WindModule.dll 7KB
UnityEngine.ScreenCaptureModule.dll 7KB
UnityEngine.JSONSerializeModule.dll 7KB
UnityEngine.TerrainPhysicsModule.dll 7KB
UnityEngine.PerformanceReportingModule.dll 7KB
UnityEngine.CrashReportingModule.dll 7KB
globalgamemanagers 29KB
build.gradle 2KB
build.gradle 1015B
artest.jar 57.22MB
unity-classes.jar 73KB
EasyAR.jar 64KB
UnityPlayerActivity.java 4KB
MainActivity.java 3KB
BaseApplication.java 2KB
UnityPlayerProxyActivity.java 860B
UnityPlayerNativeActivity.java 635B
picone.jpg 5.73MB
picthree.jpg 4.67MB
argame00.jpg 187KB
namecard.jpg 181KB
argame01.jpg 136KB
ZHAIGONG.JPG 124KB
idback.jpg 11KB
targets.json 411B
level0 28KB
backMusic.m4a 407KB
xiaohuangren.mp3 1.34MB
videoTest.mp4 3.47MB
transparentvideo.mp4 2.21MB
test.mp4 2.08MB
person_with_alpha.alpha.mp4 763KB
ic_launcher_round.png 15KB
ic_launcher_round.png 10KB
app_icon.png 10KB
app_banner.png 9KB
ic_launcher.png 9KB
ic_launcher_round.png 7KB
app_icon.png 6KB
ic_launcher.png 6KB
ic_launcher_round.png 5KB
ic_launcher.png 4KB
app_icon.png 3KB
ic_launcher.png 3KB
ic_launcher_round.png 3KB
app_icon.png 2KB
共 134 条
- 1
- 2
资源评论
LZ涸泽而渔
- 粉丝: 267
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功