OLD_STEP_LIST_EDITOR
Documentation for the Unity C# Library
Loading...
Searching...
No Matches
ReferenceResolver.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections;
3
using
System.Collections.Generic;
4
using
PixoVR.Core
;
5
using
UnityEngine;
6
7
public
class
ReferenceResolver
: MonoBehaviour
8
{
9
[SerializeField]
private
List<MonoBehaviour>
_referenceToRegister
;
10
11
private
void
Awake
()
12
{
13
foreach
(var reference
in
_referenceToRegister
)
14
{
15
Debug.Log($
"Registering reference {gameObject.name}"
);
16
ServiceLocator
.Register(reference);
17
}
18
}
19
20
private
void
OnDestroy
()
21
{
22
foreach
(var reference
in
_referenceToRegister
)
23
{
24
Debug.Log($
"Unregistering reference {gameObject.name}"
);
25
ServiceLocator
.Unregister(reference);
26
}
27
}
28
}
PixoVR.Core.ServiceLocator
Unity components communication service.
Definition
ServiceLocator.cs:10
ReferenceResolver
Definition
ReferenceResolver.cs:8
ReferenceResolver._referenceToRegister
List< MonoBehaviour > _referenceToRegister
[SerializeField]
Definition
ReferenceResolver.cs:12
ReferenceResolver.OnDestroy
void OnDestroy()
Definition
ReferenceResolver.cs:23
ReferenceResolver.Awake
void Awake()
Definition
ReferenceResolver.cs:14
PixoVR.Core
Definition
EventBetter.cs:14
com.pixovr.coreunitysdk
Runtime
Sdk
Scripts
ServiceLocator
ReferenceResolver.cs
Generated
Wed Oct 9 2024 19:24:02
by Doxygen version
1.10.0