You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/content/job_system.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,7 @@
5
5
## Concurrent NativeContainer types
6
6
7
7
Some `NativeContainer` types also have special rules for allowing safe and deterministic write access from ParallelFor jobs. As an example, the method `NativeHashMap.Concurrent` lets you add items in parallel from [IJobParallelFor](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Jobs.IJobParallelFor.html).
8
+
9
+
## Concurrent EntityCommandBuffers
10
+
11
+
When using an `EntityCommandBuffer` to issue `EntityManager` commands from ParallelFor jobs, the `EntityCommandBuffer.Concurrent` interface must be used in order to guarantee thread safety and deterministic playback. The public methods in this interface take an extra `jobIndex` parameter, which is used to play back the recorded commands in a deterministic order. `jobIndex` must be a unique ID for each job. For performance reasons, `jobIndex` should be related to the (increasing) `index` values passed to `IJobParallelFor.Execute()`. Unless you *really* know what you're doing, using `index` as `jobIndex` is the safest choice. Using other `jobIndex` values will produce correct output, but can have severe performance implications in some cases.
Copy file name to clipboardExpand all lines: Documentation/content/system_state_components.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@
8
8
9
9
## Concept
10
10
11
-
The general use of a SystemStateComponent is expected to mirror a user component, providing the internal state.
11
+
The general use of a [SystemStateComponent](system_state_components.md) is expected to mirror a user component, providing the internal state.
12
12
13
13
For instance, given:
14
-
- FooComponent (ComponentData, user assigned)
15
-
- FooStateComponent (SystemComponentData, system assigned)
14
+
- FooComponent (`ComponentData`, user assigned)
15
+
- FooStateComponent (`SystemComponentData`, system assigned)
16
16
17
17
### Detecting Component Add
18
18
@@ -24,12 +24,12 @@ When user removes FooComponent, FooStateComponent still exists. The FooSystem up
24
24
25
25
### Detecting Destroy Entity
26
26
27
-
DestroyEntity is actually a shorthand utility for:
27
+
`DestroyEntity` is actually a shorthand utility for:
28
28
- Find Components which reference given Entity ID.
29
29
- Delete Components found
30
30
- Recycle Entity ID
31
31
32
-
However, SystemStateComponents are not removed on DestroyEntity and the Entity ID is not recycled until the last component is deleted. This gives the System the opportunity to clean up the internal state in the exact same way as with component removal.
32
+
However, `SystemStateComponents` are not removed on `DestroyEntity` and the Entity ID is not recycled until the last component is deleted. This gives the System the opportunity to clean up the internal state in the exact same way as with component removal.
Visibility of a SystemStateComponent is also controlled in the same way as a Component (using `private`, `public`, `internal`) However, it's expected, as a general rule, that a SystemStateComponent will be ReadOnly outside the system that creates it.
44
+
Visibility of a `SystemStateComponent` is also controlled in the same way as a `Component` (using `private`, `public`, `internal`) However, it's expected, as a general rule, that a `SystemStateComponent` will be `ReadOnly` outside the system that creates it.
Copy file name to clipboardExpand all lines: Documentation/content/transform_system.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# TransformSystem
2
2
3
-
TransformSystem is responsible for updating the `LocalToWorld` transformation matrices used by other systems (including rendering).
3
+
[TransformSystem](transform_system.md) is responsible for updating the `LocalToWorld` transformation matrices used by other systems (including rendering).
4
4
5
5
## Updating a TransformSystem
6
6
7
-
By default, Unity updates a single TransformSystem instance each frame. `EndFrameTransformSystem` is updated before `EndFrameBarrier` and requires no additional work.
7
+
By default, Unity updates a single `TransformSystem` instance each frame. `EndFrameTransformSystem` is updated before `EndFrameBarrier` and requires no additional work.
8
8
9
9
In cases where transform data is required to be updated at additional points in the frame, the suggested methods are:
10
10
11
-
- Create additional instance(s) of TransformSystem and use UpdateBefore/UpdateAfter attributes to control where they are updated.
11
+
- Create additional instance(s) of `TransformSystem` and use `UpdateBefore`/`UpdateAfter` attributes to control where they are updated.
12
12
13
13
For example:
14
14
@@ -18,7 +18,7 @@ For example:
18
18
{
19
19
}
20
20
```
21
-
- Create additional instance of TransformSystem and update after *every* ComponentSystem (includes Barriers, excludes JobComponentSystem) by using \[ComponentSystemPatch\] attribute. Be aware that the overhead for updating the TransformSystem after every ComponentSystem can be very high when the number of ComponentSystems is large.
21
+
- Create additional instance of `TransformSystem` and update after *every*`ComponentSystem` (includes `Barriers`, excludes `JobComponentSystem`) by using \[ComponentSystemPatch\] attribute. Be aware that the overhead for updating the `TransformSystem` after every `ComponentSystem` can be very high when the number of `ComponentSystems` is large.
22
22
23
23
For example:
24
24
@@ -33,7 +33,7 @@ For example:
33
33
34
34
## Updating Position, Rotation, Scale
35
35
36
-
The only requirement for TransfromSystem is that *one of* the following components is associated with an Entity:
36
+
The only requirement for `TransfromSystem` is that *one of* the following components is associated with an `Entity`:
37
37
38
38
```
39
39
public struct Position : IComponentData
@@ -52,7 +52,7 @@ The only requirement for TransfromSystem is that *one of* the following componen
52
52
}
53
53
```
54
54
55
-
TransformSystem will add the `LocalToWorld` component and update the matrix based on the values in your selected associated components (Position, Rotation, and Scale). LocalToWorld does not need to be added by the user or other systems.
55
+
`TransformSystem` will add the `LocalToWorld` component and update the matrix based on the values in your selected associated components (`Position`, `Rotation`, and `Scale`). `LocalToWorld` does not need to be added by the user or other systems.
56
56
57
57
```
58
58
public struct LocalToWorld : ISystemStateComponentData
@@ -61,32 +61,32 @@ TransformSystem will add the `LocalToWorld` component and update the matrix base
61
61
}
62
62
```
63
63
64
-
LocalToWorld is expected to be ReadOnly by other systems. Be aware that anything written to this component will be overwritten and its behavior during update is undefined if written to.
64
+
`LocalToWorld` is expected to be `ReadOnly` by other systems. Be aware that anything written to this component will be overwritten and its behavior during update is undefined if written to.
65
65
66
66
## Freezing transforms
67
67
68
-
In many cases, individual transforms are *never* expected to change at runtime. For these types of objects, if a Static component is added:
68
+
In many cases, individual transforms are *never* expected to change at runtime. For these types of objects, if a `Static` component is added:
69
69
70
70
```
71
71
public struct Static : IComponentData
72
72
{
73
73
}
74
74
```
75
75
76
-
They will cease to be updated after the LocalToWorld matrix has been created and updated for the first time. Any changes to associated Position, Rotation, or Scale components will be ignored. Marking `Static` transforms can substantially reduce the amount of work a TransformSystem needs to do which will improve performance.
76
+
They will cease to be updated after the `LocalToWorld` matrix has been created and updated for the first time. Any changes to associated `Position`, `Rotation`, or `Scale` components will be ignored. Marking `Static` transforms can substantially reduce the amount of work a `TransformSystem` needs to do which will improve performance.
77
77
78
78
The process of freezing is:
79
-
1. TransformSystem update queries for Static components.
80
-
2. TransformSystem adds FrozenPending component.
81
-
3. TransformSystem updates the LocalToWorld component normally.
82
-
4. On the next TransformSystem update, queries for FrozenPending components and adds Frozen component.
83
-
5. TransformSystem ignores Position, Rotation, or Scale components if there is an associated Frozen component.
79
+
1.`TransformSystem` update queries for `Static` components.
3.`TransformSystem` updates the `LocalToWorld` component normally.
82
+
4. On the next `TransformSystem` update, queries for `FrozenPending` components and adds Frozen component.
83
+
5.`TransformSystem` ignores `Position`, `Rotation`, or `Scale` components if there is an associated Frozen component.
84
84
85
85
If necessary, users can detect if LocalToWorld matrix is frozen by existence of a `Frozen` component. Generally however, identifying static objects by the existence of the `Static` component is sufficient.
86
86
87
87
## Custom transforms
88
88
89
-
In cases where user systems require custom transformation matrices and updates, the TransformSystem will ignore components associated with a `CustomLocalToWorld` component.
89
+
In cases where user systems require custom transformation matrices and updates, the `TransformSystem` will ignore components associated with a `CustomLocalToWorld` component.
90
90
91
91
```
92
92
public struct CustomLocalToWorld : IComponentData
@@ -109,7 +109,7 @@ Attaching transformations (transformation hierarchies) is controlled by separate
109
109
}
110
110
```
111
111
112
-
To attach a Child Entity to a Parent Entity, create a new Entity with an associated Attach component, assigning the respective values.
112
+
To attach a Child `Entity` to a Parent `Entity`, create a new `Entity` with an associated `Attach` component, assigning the respective values.
113
113
114
114
For example:
115
115
@@ -124,9 +124,9 @@ For example:
124
124
m_Manager.SetComponentData(attach, new Attach {Parent = parent, Child = child});
125
125
```
126
126
127
-
1. The Attach component, and associated Entity, will be destroyed by the TransformSystem on update.
128
-
2. Values in Position, Rotation, and Scale components will be interpreted as relative to parent space.
129
-
3. Attached, Parent, and LocalToParent components will be associated with the Child Entity.
127
+
1. The `Attach` component, and associated `Entity`, will be destroyed by the `TransformSystem` on update.
128
+
2. Values in `Position`, `Rotation`, and `Scale` components will be interpreted as relative to parent space.
129
+
3.`Attached`, `Parent`, and `LocalToParent` components will be associated with the Child `Entity`.
130
130
131
131
```
132
132
public struct Attached : IComponentData
@@ -146,11 +146,11 @@ For example:
146
146
147
147
## Detaching transformations
148
148
149
-
To detach a child from a parent, remove the `Attached` component from the child. When the TransformSystem is updated, the Parent component will be removed. Values in Position, Rotation, and Scale components will be interpreted as relative to world space.
149
+
To detach a child from a parent, remove the `Attached` component from the child. When the `TransformSystem` is updated, the Parent component will be removed. Values in `Position`, `Rotation`, and `Scale` components will be interpreted as relative to world space.
150
150
151
151
## Reading World values
152
152
153
-
The LocalToWorld matrix can be used to retrieve world positions.
153
+
The `LocalToWorld` matrix can be used to retrieve world positions.
Copy file name to clipboardExpand all lines: ReleaseNotes.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,20 @@
1
+
# 0.0.12
2
+
## New Features
3
+
4
+
## Upgrade guide
5
+
* OnCreateManager(int capacity) -> OnCreateManager(). All your own systems have to be changed to follow the new signature.
6
+
7
+
## Changes
8
+
* Removed capacity parameter from from ScriptBehaviourManager.OnCreateManager.
9
+
* EntityDebugger now displays the declaring type for nested types
10
+
* IncrementalCompiler is no longer a dependency on the entities package. If you want to continue to use it you need to manually include it from the package manager UI for your project.
11
+
*`EntityCommandBuffer.Concurrent` playback is now deterministic. Playback order is determined by the new `jobIndex` parameter accepted by all public API methods, which must be a unique ID per job (such as the index passed to `Execute()` in an IJobParallelFor).
12
+
13
+
## Fixes
14
+
* Fixed bug where ComponentDataWrapper fields spilled out of their area in the Inspector.
15
+
* ComponentDataWrapper for empty data types (i.e. tags) no longer displays error in Inspector if wrapped type is not serializable.
16
+
* Fixed an issue where EntityDebugger was slow if you scrolled down past 3 million entities
17
+
1
18
# 0.0.11
2
19
## New Features
3
20
* Global `Disabled` component. Any component data associated with same entity referenced by `Disabled` component will be ignored by all system updates.
0 commit comments