1 using System.Collections;
2 using System.Collections.Generic;
14 [HideInInspector]
public UnityEngine.Events.UnityEvent
onAwake;
17 [HideInInspector]
public UnityEngine.Events.UnityEvent
onStart;
20 [HideInInspector]
public UnityEngine.Events.UnityEvent
onEnable;
23 [HideInInspector]
public UnityEngine.Events.UnityEvent
onDisable;
25 protected virtual void Awake() {
29 protected virtual void Start() {
42 public override void OnNetworkSpawn()
44 base.OnNetworkSpawn();
47 onRemoteStart.Invoke();
49 if (changeLayerOnRemote)
51 gameObject.layer = remoteLayer;
52 if (changeLayerOnRemote_IncludeChildren)
54 foreach (Transform child
in GetComponentsInChildren<Transform>())
56 child.gameObject.layer = remoteLayer;
63 GameObject.Destroy(
this);
67 gameObject.SetActive(
false);
68 AVR_Root.Instance.ReEnableAtEndOfFrame(gameObject);
74 public bool destroyOnRemote =
true;
76 public bool changeLayerOnRemote =
false;
78 public bool changeLayerOnRemote_IncludeChildren =
false;
80 public int remoteLayer = 0;
82 [HideInInspector]
public UnityEngine.Events.UnityEvent onRemoteStart;
84 protected interface IInternalState<T> : Unity.Netcode.INetworkSerializable where T : AVR_Component
86 public void FromReference(T reference);
87 public void ApplyState(T reference);
Monobehaviour but with an added URL button to a documentation page.
UnityEngine.Events.UnityEvent onAwake
Events called when this component awakes.
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...
UnityEngine.Events.UnityEvent onDisable
Events called when this component is disabled.
UnityEngine.Events.UnityEvent onStart
Events called when this component starts.
Base class for all arc-vr components. A component is typically a Monobehaviour that represents a virt...
UnityEngine.Events.UnityEvent onEnable
Events called when this component is enabled.