Unity脚本修改打包PlayerSettings设置 安卓设置SDCard权限

  目录  

1.设置代码

2.PlayerSettings API 


1.设置代码

 设置产品名、包名、图标、sdcard读写、场景等功能

脚本要放在Editor文件夹下面

using UnityEngine;
using UnityEditor;

public class XHBuildSetting 
{
    [MenuItem("XHBuild/Build 2D", false, 100)]
    public static void Buidld2D()
    {
        Debug.Log("Build 2D");
        PlayerSettings.productName = "2D播放器";
        PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.xhsj.Player2D");
        SetDefaultIcon("2DIcon.png");
        SetSceneByIndex(1);
    }

    [MenuItem(&

你可能感兴趣的:(Android,Unity编辑器拓展,Unity进阶)