// Token: 0x060013C5 RID: 5061 RVA: 0x0006C6D0 File Offset: 0x0006A8D0 protected virtual void Start() { if (base.GetComponent <VRTK_InteractableObject>() == null) { foreach (VRTK_InteractableObject vrtk_InteractableObject in base.GetComponentsInChildren <VRTK_InteractableObject>()) { if (vrtk_InteractableObject.GetComponent <VRTK_ContentHandler>() == null) { VRTK_ContentHandler vrtk_ContentHandler = vrtk_InteractableObject.gameObject.AddComponent <VRTK_ContentHandler>(); vrtk_ContentHandler.control = this.control; vrtk_ContentHandler.inside = this.inside; vrtk_ContentHandler.outside = this.outside; } } } }
private void Start() { VRTK_InteractableObject io = GetComponent <VRTK_InteractableObject>(); if (io == null) { // treat as parent and assign to all children foreach (VRTK_InteractableObject childIo in GetComponentsInChildren <VRTK_InteractableObject>()) { if (childIo.GetComponent <VRTK_ContentHandler>() == null) { VRTK_ContentHandler ch = childIo.gameObject.AddComponent <VRTK_ContentHandler>(); ch.control = control; ch.inside = inside; ch.outside = outside; } } } }
protected virtual void Start() { VRTK_InteractableObject contentInteractableObject = GetComponent <VRTK_InteractableObject>(); if (contentInteractableObject == null) { // treat as parent and assign to all children foreach (var childIo in GetComponentsInChildren <VRTK_InteractableObject>()) { if (childIo.GetComponent <VRTK_ContentHandler>() == null) { VRTK_ContentHandler childContentHandler = childIo.gameObject.AddComponent <VRTK_ContentHandler>(); childContentHandler.control = control; childContentHandler.inside = inside; childContentHandler.outside = outside; } } } }
protected virtual void Start() { VRTK_InteractableObject contentInteractableObject = GetComponent <VRTK_InteractableObject>(); if (contentInteractableObject == null) { // treat as parent and assign to all children VRTK_InteractableObject[] foundObjects = GetComponentsInChildren <VRTK_InteractableObject>(); for (int i = 0; i < foundObjects.Length; i++) { VRTK_InteractableObject foundIO = foundObjects[i]; if (foundIO.GetComponent <VRTK_ContentHandler>() == null) { VRTK_ContentHandler childContentHandler = foundIO.gameObject.AddComponent <VRTK_ContentHandler>(); childContentHandler.control = control; childContentHandler.inside = inside; childContentHandler.outside = outside; } } } }