Skip to content

Commit 99c6377

Browse files
committed
2 parents cf785ba + 489a5bf commit 99c6377

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,50 @@
1-
# [WIP] Unity simple notifications
1+
# Unity simple notifications
22

3-
Simple UI notifications package for Unity game engine.
3+
Simple but powerful UI notifications package for Unity game engine.
4+
5+
## Usage
46

57
Usage:
68
1. Right click scene hierarchy
79
2. Click UI/Notifications
810

11+
![HowTo](Documentation~/images/HowTo.png)
12+
913
Now you can send Notifications from your script like this:
1014
```c#
1115
Notifications.Send("Hello world");
1216
```
17+
18+
![Notification](Documentation~/images/SimpleShowCase.gif)
19+
20+
## Performance and thread safe :rocket:
21+
22+
Here is how it looks when billion notifications are sent simultaneously from another thread:
23+
24+
![Notification](Documentation~/images/PerformanceShowCase.gif)
25+
26+
Try it yourself! Code:
27+
```c#
28+
using UnityEngine;
29+
using System.Threading;
30+
using Group3d.Notifications;
31+
32+
public class TEST : MonoBehaviour
33+
{
34+
private void Start()
35+
{
36+
new Thread(() =>
37+
{
38+
Thread.CurrentThread.IsBackground = true;
39+
var r = new System.Random();
40+
int counter = 0;
41+
while (counter < 1000000000)
42+
{
43+
Notifications.Send($"Test {r.Next(0, 10000)}");
44+
counter++;
45+
}
46+
}).Start();
47+
}
48+
}
49+
50+
```

0 commit comments

Comments
 (0)