기술 자료

Unity Engine

Unity Engine

AddComponent<T>(T)

Adds a ScriptableObject to the build profile as a sub-asset. Only one instance per type can be embedded within a build profile.
읽는 시간 1분최근 업데이트: 3시간 전

Definition

public void AddComponent<T>(T objectToAdd) where T : Object

Parameters

objectToAdd

T
ScriptableObject instance to add.

Remarks

This method doesn't accept BuildProfileGraphicsSettings or BuildProfileQualitySettings. Passing either type throws an
ArgumentException
. To add these settings, use BuildProfile.CreateComponent.
Note: This method is restricted to ScriptableObject types and doesn't support all settings visible in the Build Profiles window. To add PlayerSettings, use the Build Profiles window.