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
**Component properties:** Public properties are the heart of your Components, and are here to provide data for the Systems to use. Properties can be added to components like in any other class and can consist of any kind of type.
145
+
**Public Properties:** Public properties are the heart of your [Components](#components), and are here to provide data for the [Systems](#systems) to use. Properties can be added to [Components](#components) like in any other class and can consist of any kind of type.
@@ -153,6 +153,22 @@ public class MovementComponent : Component<MovementComponent, MovementSystem> {
153
153
}
154
154
```
155
155
156
+
**Editor Protection:** Sometimes you want to hide properties from the Unity Editor when they are, for example are managed by the [Systems](#systems). By flagging these properties with the Protected attribute, it will no longer shows up in the Unity Editor, but is still accessible by the [Systems](#systems).
**Injection:** The [System](#systems) allows the use of the Injected attribute on properties to automatically assign the values of referenced [Systems](#Systems), [Services](#Services) and [Controllers](#controllers), making all public methods and properties accessible. These properties are assigned during the OnInitialize cycle and are available for use at the OnInitialized cycle.
**Assets:** The [System](#system) allows the use of the Asset attribute on properties to automatically assign the values of referenced Assets. Assets can be assigned on the [Controller](#controllers) instance in your Scene. When assigning using the empty contructor, the property's name will be used for searching the Asset, to find an Asset by it's name, use the string overload. All types of UnityEngine's Object can be used in these fields. These properties are assigned during the OnInitialize cycle and are available for use at the OnInitialized cycle. When an asset is not found, an error is thrown.
**Injection:** The [Service](#services) allows the use of the Injected attribute on properties to automatically assign the values of referenced [Systems](#Systems), [Services](#Services) and [Controllers](#controllers), making all public methods and properties accessible. These properties are assigned during the OnInitialize cycle and are available for use at the OnInitialized cycle.
212
+
213
+
```csharp
214
+
publicclassAudioService : Service<AudioService> {
215
+
[Injected] privateMainControllermainController;
216
+
[Injected] privateMovementSystemmovementSystem;
217
+
[Injected] privateNetworkServicenetworkService;
218
+
}
219
+
```
220
+
221
+
**Assets:** The [Service](#services) allows the use of the Asset attribute on properties to automatically assign the values of referenced Assets. Assets can be assigned on the [Controller](#controllers) instance in your Scene. When assigning using the empty contructor, the property's name will be used for searching the Asset, to find an Asset by it's name, use the string overload. All types of UnityEngine's Object can be used in these fields. These properties are assigned during the OnInitialize cycle and are available for use at the OnInitialized cycle. When an asset is not found, an error is thrown.
222
+
223
+
```csharp
224
+
publicclassAudioService : Service<AudioService> {
225
+
[Asset] privateGameObjectplayerPrefab;
226
+
[Asset ("ShopDialog")] privateNpcDialognpcDialog;
227
+
}
228
+
```
229
+
176
230
_This section of the documentation is in process!_
0 commit comments