Class SceneInfoUtils
Class responsible for updating scene info structs to reflect changes made to scene assets. Extends AssetPostprocessor so it can respond to asset changes.
Implements
Namespace: Microsoft.MixedReality.Toolkit.Editor
Assembly: cs.temp.dll.dll
Syntax
public class SceneInfoUtils : AssetPostprocessor, IProcessSceneWithReport, AssetPostprocessor
Properties
CachedScenes
Cached scenes used by SceneInfoDrawer to keep property drawer performant.
Declaration
public static EditorBuildSettingsScene[] CachedScenes { get; }
Property Value
Type | Description |
---|---|
EditorBuildSettingsScene[] |
CachedScenes
Cached scenes used by SceneInfoDrawer to keep property drawer performant.
Declaration
public static EditorBuildSettingsScene[] CachedScenes { get; }
Property Value
Type | Description |
---|---|
EditorBuildSettingsScene[] |
callbackOrder
Declaration
public int callbackOrder { get; }
Property Value
Type | Description |
---|---|
Int32 |
callbackOrder
Declaration
public int callbackOrder { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
FindScene(SerializedProperty, SerializedProperty, ref UnityEngine.Object)
Finds a missing scene asset reference for a SceneInfo struct.
Declaration
public static bool FindScene(SerializedProperty nameProperty, SerializedProperty pathProperty, ref UnityEngine.Object asset)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | nameProperty | |
SerializedProperty | pathProperty | |
UnityEngine.Object | asset |
Returns
Type | Description |
---|---|
Boolean | True if scene was found. |
FindScene(SerializedProperty, SerializedProperty, ref UnityEngine.Object)
Finds a missing scene asset reference for a SceneInfo struct.
Declaration
public static bool FindScene(SerializedProperty nameProperty, SerializedProperty pathProperty, ref UnityEngine.Object asset)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | nameProperty | |
SerializedProperty | pathProperty | |
UnityEngine.Object | asset |
Returns
Type | Description |
---|---|
Boolean | True if scene was found. |
GetSceneInfoRelativeProperties(SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty)
Finds all relative properties of a SceneInfo struct.
Declaration
public static void GetSceneInfoRelativeProperties(SerializedProperty property, out SerializedProperty assetProperty, out SerializedProperty nameProperty, out SerializedProperty pathProperty, out SerializedProperty buildIndexProperty, out SerializedProperty includedProperty, out SerializedProperty tagProperty)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property | |
SerializedProperty | assetProperty | |
SerializedProperty | nameProperty | |
SerializedProperty | pathProperty | |
SerializedProperty | buildIndexProperty | |
SerializedProperty | includedProperty | |
SerializedProperty | tagProperty |
GetSceneInfoRelativeProperties(SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty, out SerializedProperty)
Finds all relative properties of a SceneInfo struct.
Declaration
public static void GetSceneInfoRelativeProperties(SerializedProperty property, out SerializedProperty assetProperty, out SerializedProperty nameProperty, out SerializedProperty pathProperty, out SerializedProperty buildIndexProperty, out SerializedProperty includedProperty, out SerializedProperty tagProperty)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | property | |
SerializedProperty | assetProperty | |
SerializedProperty | nameProperty | |
SerializedProperty | pathProperty | |
SerializedProperty | buildIndexProperty | |
SerializedProperty | includedProperty | |
SerializedProperty | tagProperty |
OnPostProcessScene()
Searches for all components in a scene and refreshes any SceneInfo fields found.
Declaration
public static void OnPostProcessScene()
OnPostProcessScene()
Searches for all components in a scene and refreshes any SceneInfo fields found.
Declaration
public static void OnPostProcessScene()
OnProcessScene(Scene, BuildReport)
Implements IProcessSceneWithReport.OnProcessScene
Declaration
public void OnProcessScene(Scene scene, BuildReport report)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | |
BuildReport | report |
OnProcessScene(Scene, BuildReport)
Implements IProcessSceneWithReport.OnProcessScene
Declaration
public void OnProcessScene(Scene scene, BuildReport report)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | |
BuildReport | report |
RefreshCachedScenes()
Call this when you make a change to the build settings and need those changes to be reflected immediately.
Declaration
public static void RefreshCachedScenes()
RefreshCachedScenes()
Call this when you make a change to the build settings and need those changes to be reflected immediately.
Declaration
public static void RefreshCachedScenes()
RefreshSceneInfo(UnityEngine.Object, SerializedProperty, SerializedProperty, SerializedProperty, SerializedProperty, SerializedProperty)
Updates all the serialized properties for a SceneInfo struct.
Declaration
public static bool RefreshSceneInfo(UnityEngine.Object asset, SerializedProperty nameProperty, SerializedProperty pathProperty, SerializedProperty buildIndexProperty, SerializedProperty includedProperty, SerializedProperty tagProperty)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Object | asset | |
SerializedProperty | nameProperty | |
SerializedProperty | pathProperty | |
SerializedProperty | buildIndexProperty | |
SerializedProperty | includedProperty | |
SerializedProperty | tagProperty |
Returns
Type | Description |
---|---|
Boolean | True if a property has changed. |
RefreshSceneInfo(UnityEngine.Object, SerializedProperty, SerializedProperty, SerializedProperty, SerializedProperty, SerializedProperty)
Updates all the serialized properties for a SceneInfo struct.
Declaration
public static bool RefreshSceneInfo(UnityEngine.Object asset, SerializedProperty nameProperty, SerializedProperty pathProperty, SerializedProperty buildIndexProperty, SerializedProperty includedProperty, SerializedProperty tagProperty)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Object | asset | |
SerializedProperty | nameProperty | |
SerializedProperty | pathProperty | |
SerializedProperty | buildIndexProperty | |
SerializedProperty | includedProperty | |
SerializedProperty | tagProperty |
Returns
Type | Description |
---|---|
Boolean | True if a property has changed. |