Skip to content

Commit 580894a

Browse files
committed
Updated readme
Added a screenshot
1 parent 554cbbd commit 580894a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ A collection of attributes to control the execution order of your scripts in Uni
55
## Use
66
Add one of these attribute to your script's class definition to change its script execution order :
77
- `[ExecutionOrder(int order)]` : The script execution order is set to `order`
8-
- `[ExecuteAfter(Type type)]` : The script execution order is set to a value superior to the one of the script `type`. This will ensure that your script will be executed after the script `type`. By default, the script execution order is increased by 10.
8+
- `[ExecuteAfter(Type type)]` : The script execution order is set to a value greater than the one of the script `type`. This will ensure that your script will be executed after the script `type`. By default, the script execution order is increased by 10.
99

1010
A script can have multiple `ExecuteAfter` attributes and will be executed after all the scripts given in parameters.
1111
A script cannot have both an `ExecutionOrder` and an `ExecuteAfter` attribute.
1212

13+
Changing the execution order of a script with either an `ExecutionOrder` or an `ExecuteAfter` attribute from the *Script Execution Order* inspector in Unity will have no effect. The order will be reset to the one defined by the attributes.
14+
15+
Changing a script execution order, either from the inspector or with an attribute, will cause a recompilation of the scripts.
1316

1417
## Example
1518
```csharp
@@ -48,4 +51,6 @@ public class Script4 : MonoBehaviour {
4851
}
4952
}
5053
```
54+
The resulting script execution orders in the inspector:
5155

56+
![Script Execution Order inspector screenshot](/docs/screenshot1.png)

docs/screenshot1.png

3.54 KB
Loading

0 commit comments

Comments
 (0)