Skip to content
This repository was archived by the owner on Aug 10, 2021. It is now read-only.

Commit 3772ad3

Browse files
committed
Cleanup meta files, add images to docs
1 parent dfeeb13 commit 3772ad3

File tree

8 files changed

+196
-10
lines changed

8 files changed

+196
-10
lines changed

Documentation/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Documentation
22

33
## Game Events
4+
<p align="center">
5+
<img width="100%" src="events.png" alt="Diagram showing how data is shared using events."/>
6+
</p>
7+
48
Game events allow to decouple prefabs from direct dependencies such as scene or nested prefab game objects. The biggest benefit of events is that they can be referenced in isolated prefabs, this allows to later avoid having to set them up in the scene.
59

610
The package provides two types of game events:
@@ -82,9 +86,13 @@ public class CustomGameEventListener : ArgumentGameEventListener<CustomGameEvent
8286
```
8387

8488
### Examples
85-
Import the `GameEvents` samples which show how to use game events in various situations.
89+
Import the `GameEvents` sample which shows how to use game events in various situations.
8690

8791
## Mutable Objects
92+
<p align="center">
93+
<img width="100%" src="mutable-objects.png" alt="Diagram showing how data is shared when using mutable objects."/>
94+
</p>
95+
8896
Mutable objects allow using `ScriptableObject` assets to store and share data. They are handy when a lot of behaviours need access to specific data. In such cases, mutable objects can be injected in dependant behaviours instead of forming hard dependencies between them or using singletons.
8997

9098
### Mutable object assets
@@ -127,3 +135,6 @@ public class MutableCustom : MutableObject
127135
```
128136

129137
After that is set up, make sure to call `MutableObjectExtensions.ResetMutatedObjects()` somewhere in one of the `Awake` methods, each time before a scene loads. Make sure the script which calls this extension executes before other scripts by setting up [Script Execution Order](https://docs.unity3d.com/Manual/class-MonoManager.html).
138+
139+
### Examples
140+
Import the `MutableObject` sample which shows how to use game events in various situations.

Documentation/events.png

151 KB
Loading

Documentation/events.png.meta

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Documentation/mutable-objects.png

149 KB
Loading

Documentation/mutable-objects.png.meta

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/GameEvents/Generic/BaseGameEventListener.cs.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

Runtime/MutableObjects.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

Samples/MutableObjects.meta

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)