OLD_STEP_LIST_EDITOR
Documentation for the Unity C# Library
Loading...
Searching...
No Matches
NoAllocToggleListener.cs
Go to the documentation of this file.
1
using
PixoVR.Core
;
2
using
System;
3
using
System.Collections.Generic;
4
using
System.Linq;
5
using
System.Text;
6
using
UnityEngine;
7
8
public
class
NoAllocToggleListener
: MonoBehaviour
9
{
10
private
int
counter
;
11
private
Action<TextMessage>
handler
;
12
13
private
void
Awake
()
14
{
15
handler
= (
TextMessage
msg) => ++
counter
;
16
}
17
18
private
void
Update
()
19
{
20
EventBetter
.Listen(
this
,
handler
);
21
EventBetter
.
UnlistenAll
(
this
);
22
}
23
}
NoAllocToggleListener
Definition
NoAllocToggleListener.cs:9
NoAllocToggleListener.counter
int counter
Definition
NoAllocToggleListener.cs:10
NoAllocToggleListener.handler
Action< TextMessage > handler
Definition
NoAllocToggleListener.cs:11
NoAllocToggleListener.Awake
void Awake()
Definition
NoAllocToggleListener.cs:13
NoAllocToggleListener.Update
void Update()
Definition
NoAllocToggleListener.cs:18
PixoVR.Core.EventBetter
Intentionally made partial, in case you want to extend it easily.
Definition
EventBetter.cs:20
PixoVR.Core.EventBetter.UnlistenAll
static bool UnlistenAll(UnityEngine.Object listener)
Unregisters all message types for a given listener.
Definition
EventBetter.cs:98
TextMessage
Definition
SimpleProducer.cs:5
PixoVR.Core
Definition
EventBetter.cs:14
com.pixovr.coreunitysdk
Samples
EventBetter
NoAlloc
NoAllocToggleListener.cs
Generated
Wed Oct 9 2024 19:24:02
by Doxygen version
1.10.0