# CreateBuildProfile(GUID, string, UnityAction<BuildProfile>)

> Creates a new build profile asset for the specified platform with the provided name and places it under Assets/Settings/BuildProfiles.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Build.Profile](/engine/6000.5/script-reference/unityeditor/build/profile.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static BuildProfile CreateBuildProfile(GUID platformId, string profileName, UnityAction<BuildProfile> onProfileReady = null)
```

### Parameters

**** (GUID): The GUID of the target platform. Must be a valid platform installed in the Unity Editor.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name for the build profile. Used as the asset filename.**** (\[UnityAction\<BuildProfile>]\(/engine/6000.5/script-reference/unityengine/events/unityaction)): Optional callback invoked when the profile completes initialization and is ready to use. The callback must be static or on a serialized UnityEngine.Object to survive domain reloads. Non-persistent callbacks fail to invoke if a domain reload occurs during initialization.

### Returns

| Type                                                                                      | Description                                                                                                                |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [BuildProfile](/engine/6000.5/script-reference/unityeditor/build/profile/buildprofile.md) | The newly created BuildProfile instance. The profile may require initialization if platform packages need to be installed. |

### Remarks

This method automatically installs required platform packages if they are not already installed. Package installation happens asynchronously and begins immediately.

Unity creates the profile at: `Assets/Settings/Build Profiles/{profileName}.asset`. If a profile with the same name exists, a unique name is generated.

```csharp
//Static method example - will continue after a domain reload
BuildProfile profile = BuildProfile.CreateBuildProfile(
    androidGuid,
    "My Profile",
    OnProfileReadyStatic);

static void OnProfileReadyStatic(BuildProfile profile)
{
    Debug.Log($"Profile {profile.name} ready!");
}
```

Use [BuildProfile.GetInstalledPlatformModules](/engine/6000.5/script-reference/unityeditor/build/profile/buildprofile/getinstalledplatformmodules.md) to fetch installed platform identifiers.
