0
0

UnityでビルドしたiOSアプリの表示名 (Bundle display name)

Posted at

iOSアプリの表示名を任意に設定

  • Bundle display nameは iOSのアプリ名として表示される名前
  • 毎回 "My Project (1)" として名前が付けられてしまう
  • Bundle display nameの変更は
    1. Unity の Project Setting > Player > Product Name によって設定される
    2. BuildScriptで自動化できる

using UnityEditor;
using UnityEngine;

public class BuildScript
{
    [MenuItem("Build/Build Prototype 1")]
    public static void BuildPrototype1()
    {
        Build("com.companyname.prototype1", "Builds/Prototype1", "Prototype 1");
    }

    [MenuItem("Build/Build Prototype 2")]
    public static void BuildPrototype2()
    {
        Build("com.companyname.prototype2", "Builds/Prototype2", "Prototype 2");
    }

    private static void Build(string bundleIdentifier, string outputPath, string productName)
    {
        // Set the Bundle Identifier
        PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, bundleIdentifier);
        // Set the Product Name (Display Name)
        PlayerSettings.productName = productName;

        BuildPipeline.BuildPlayer(
            new string[] { "Assets/Scenes/MainScene.unity" }, // Replace with your scene paths
            outputPath,
            BuildTarget.iOS,
            BuildOptions.None
        );

        Debug.Log($"Build completed for {bundleIdentifier} with display name '{productName}'");
    }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0