Documentation for the Unity C# Library
Loading...
Searching...
No Matches
NoAllocConsumer.cs
Go to the documentation of this file.
1using PixoVR.Core;
2using System;
3using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using UnityEngine;
7
8public class NoAllocConsumer : MonoBehaviour
9{
10 private int count = 0;
11
12 private void Awake()
13 {
14 EventBetter.Listen(this, (TextMessage msg) => ++count);
15 }
16
17 private void OnDestroy()
18 {
19 Debug.Log("Messages received: " + count);
20 }
21}
Intentionally made partial, in case you want to extend it easily.