Class XRGeneralSettingsPerBuildTarget
Container class that holds general settings for each build target group installed in Unity.
Namespace: UnityEditor.XR.Management
Syntax
public class XRGeneralSettingsPerBuildTarget : ScriptableObject, ISerializationCallbackReceiver
Methods
CreateDefaultManagerSettingsForBuildTarget(BuildTargetGroup)
Create a new default instance of XRManagerSettings for a build target. Requires that the there exists a settings instance for the build target. If there isn't, then one is created.
This will overwrite any current settings for that build target.
Declaration
public void CreateDefaultManagerSettingsForBuildTarget(BuildTargetGroup targetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | targetGroup | An enum specifying which platform group this build is for. |
CreateDefaultSettingsForBuildTarget(BuildTargetGroup)
Create default settings for a given build target.
This will overwrite any current settings for that build target.
Declaration
public void CreateDefaultSettingsForBuildTarget(BuildTargetGroup buildTargetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | buildTargetGroup | Build target to create default settings for. |
HasManagerSettingsForBuildTarget(BuildTargetGroup)
Check if current settings instance has an instance of XRManagerSettings.
Declaration
public bool HasManagerSettingsForBuildTarget(BuildTargetGroup targetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | targetGroup | An enum specifying which platform group this build is for. |
Returns
Type | Description |
---|---|
Boolean | True if it exists, false otherwise. |
HasSettingsForBuildTarget(BuildTargetGroup)
Query this settings store to see if there are settings for a specific
Declaration
public bool HasSettingsForBuildTarget(BuildTargetGroup buildTargetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | buildTargetGroup | Build target to check |
Returns
Type | Description |
---|---|
Boolean | True if there are settings, otherwise false. |
ManagerSettingsForBuildTarget(BuildTargetGroup)
Return the current instance of XRManagerSettings for a build target.
Declaration
public XRManagerSettings ManagerSettingsForBuildTarget(BuildTargetGroup targetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | targetGroup | An enum specifying which platform group this build is for. |
Returns
Type | Description |
---|---|
XRManagerSettings |
OnAfterDeserialize()
Serialization override.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Serialization override.
Declaration
public void OnBeforeSerialize()
SetSettingsForBuildTarget(BuildTargetGroup, XRGeneralSettings)
Set specific settings for a given build target.
Declaration
public void SetSettingsForBuildTarget(BuildTargetGroup targetGroup, XRGeneralSettings settings)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | targetGroup | An enum specifying which platform group this build is for. |
XRGeneralSettings | settings | An instance of XRGeneralSettings to assign for the given key. |
SettingsForBuildTarget(BuildTargetGroup)
Get specific settings for a given build target.
Declaration
public XRGeneralSettings SettingsForBuildTarget(BuildTargetGroup targetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | targetGroup | An enum specifying which platform group this build is for. |
Returns
Type | Description |
---|---|
XRGeneralSettings | The instance of XRGeneralSettings assigned to the key, or null if not. |
XRGeneralSettingsForBuildTarget(BuildTargetGroup)
Given a build target, get the general settings container assigned to it.
Declaration
public static XRGeneralSettings XRGeneralSettingsForBuildTarget(BuildTargetGroup targetGroup)
Parameters
Type | Name | Description |
---|---|---|
BuildTargetGroup | targetGroup | An enum specifying which platform group this build is for. |
Returns
Type | Description |
---|---|
XRGeneralSettings | The instance of XRGeneralSettings assigned to the key, or null if not. |