File tree Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Original file line number Diff line number Diff line change 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
57Usage:
681 . Right click scene hierarchy
792 . Click UI/Notifications
810
11+ ![ HowTo] ( Documentation~/images/HowTo.png )
12+
913Now you can send Notifications from your script like this:
1014``` c#
1115Notifications .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+ ```
You can’t perform that action at this time.
0 commit comments