Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateComponent<T>()

Creates a new instance of a given scriptable object and adds it as a sub-asset to the build profile. Only one instance per type can be embedded within a build profile.
Read time 1 minuteLast updated 10 days ago

Definition

public T CreateComponent<T>() where T : Object

Returns

Type

Description

TScriptableObject type to instantiate.

Remarks

Note: This function is restricted to ScriptableObject types and cannot be used for all settings visible in the Build Profiles window. To create built-in settings such as PlayerSettings, GraphicsSettings, and QualitySettings, use the Build Profiles window.