unity android快速设置app icon
2021-07-16 本文已影响0人
安宇辛
一:需求
unity 和 android 的设置app icon 的方法太麻烦 需要简化操作 最好拖入即可
二:实现
1.我们在在Plugins/Android 下面 创建res文件夹
2.我们模仿 unity 打包是自动产生的 icon 文件夹 复制到res目录下

3.创建好了后 我们把对应的icon 放入即可
ic_launcher 是方图标 ic_launcher_round 是圆图标


4我们在android 的设置界面 选中Publishing Settings


5我们打开Plugins/Android 下的LauncherManifest.xml文件
添加
android:icon="@mipmap/ic_launcher" 方图标
android:roundIcon="@mipmap/ic_launcher_round" 圆图标
<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="preferExternal">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<application android:extractNativeLibs="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"/>
</manifest>
6.然后用unity 进行打包 就会发现app icon 变了