Documentation for the Unity C# Library
Loading...
Searching...
No Matches
ServiceRegister.cs
Go to the documentation of this file.
1using PixoVR.Core;
2using System.Collections;
3using System.Collections.Generic;
4using UnityEngine;
5
6namespace PixoVR.Core
7{
8 public class ServiceRegister : MonoBehaviour
9 {
10 [SerializeField]
11 private MonoBehaviour service;
12
13 private void Awake()
14 {
15 Debug.Log(gameObject.name);
17 ServiceLocator.Register(service);
18 }
19
20 private void OnDestroy()
21 {
22 ServiceLocator.Unregister(service);
23 }
24 }
25}
Unity components communication service.
MonoBehaviour service
[SerializeField]