赞
踩
和之前介绍的扫描二维码的教程类似,对于在unity3d中截图的功能实现,也可以两种方式,
1、 使用现成插件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<manifest xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.qualcomm.QCARUnityPlayer"
android:versionCode=
"1"
android:versionName=
"1.0"
>
<uses-sdk android:minSdkVersion=
"8"
/>
<uses-feature android:name=
"android.hardware.camera"
/>
<supports-screens android:smallScreens=
"true"
android:normalScreens=
"true"
android:largeScreens=
"true"
android:anyDensity=
"true"
/>
<uses-permission android:name=
"android.permission.INTERNET"
/>
<uses-permission android:name=
"android.permission.CAMERA"
/>
<uses-permission android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<application android:icon=
"@drawable/app_icon"
android:label=
"@string/app_name"
android:theme=
"@android:style/Theme.NoTitleBar.Fullscreen"
android:debuggable=
"false"
>
<activity android:name=
"com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity"
android:label=
"@string/app_name"
android:screenOrientation=
"portrait"
android:configChanges=
"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
>
<meta-data android:name=
"android.app.lib_name"
android:value=
"unity"
/>
<meta-data android:name=
"unityplayer.ForwardNativeEventsToDalvik"
android:value=
"false"
/>
<intent-filter>
<action android:name=
"android.intent.action.MAIN"
/>
<category android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity android:name=
"com.unity3d.player.VideoPlayer"
android:label=
"@string/app_name"
android:screenOrientation=
"portrait"
android:configChanges=
"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
>
</activity>
</application>
</manifest>
<!-- android:installLocation=
"preferExternal"
-->
|
1
|
StartCoroutine(ScreenshotManager.Save(
"test"
,
"myScreenShot"
,
false
));
|
1
2
3
4
5
|
string
date = System.DateTime.Now.ToString(
"dd-MM-yy"
);
ScreenshotManager.ScreenShotNumber++;
string
screenshotFilename = fileName +
"_"
+ ScreenshotManager.ScreenShotNumber +
"_"
+ date +
".png"
;
|
1
|
string
androidPath =
"/../../../../DCIM/"
+ albumName +
"/"
+ screenshotFilename;
|
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。