文档

Unity Engine

Unity Engine

RemoveComponent

Removes a component of type T from a given build profile.
阅读时间1 分钟最后更新于 18 小时前

Definition

RemoveComponent<T>()

Removes a component of type
T
from a given build profile.
public void RemoveComponent<T>() where T : Object

Remarks

When you remove BuildProfileGraphicsSettings or BuildProfileQualitySettings, the build profile uses the global graphics settings or quality levels again. Unity destroys the removed object.
Note: This method is restricted to ScriptableObject types and doesn't support all settings visible in the Build Profiles window. To remove PlayerSettings, use the Build Profiles window.

RemoveComponent<T>(T)

Removes a component of type
T
from a given build profile.
public void RemoveComponent<T>(T objectToRemove) where T : Object

Parameters

objectToRemove

T
Specific instance to remove. Must already be part of the current profile.

Remarks

When you remove BuildProfileGraphicsSettings or BuildProfileQualitySettings, the build profile uses the global graphics settings or quality levels again. Unity destroys the removed object.
Note: This method is restricted to ScriptableObject types and doesn't support all settings visible in the Build Profiles window. To remove PlayerSettings, use the Build Profiles window.