Unity - Scripting API: RunAfterClassAttribute
class in UnityEditor.Callbacks
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
Add this attribute to a callback method to mark that this callback must be run after any callbacks that are part of the specified class.
using UnityEditor; using UnityEditor.Callbacks;class RunFirst : AssetPostprocessor { [RunBeforeClass(typeof(RunNext))] static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { } }
class RunNext : AssetPostprocessor { static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { } }
class RunLast : AssetPostprocessor { [RunAfterClass(typeof(RunNext))] static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { } }
Properties
| Property | Description |
|---|---|
| classType | The class type that should be run before this callback. |
Constructors
| Constructor | Description |
|---|---|
| RunAfterClassAttribute | Add this attribute to a callback method to mark that this callback must be run after any callbacks that are part of the specified class. |