/// <summary> /// Automatically find the draggable camera if possible. /// </summary> void Awake() { // Legacy functionality support for backwards compatibility if (target != null) { if (draggableCamera == null) { draggableCamera = target.GetComponent<NGUIDraggableCamera>(); if (draggableCamera == null) { draggableCamera = target.gameObject.AddComponent<NGUIDraggableCamera>(); } } target = null; } else if (draggableCamera == null) { draggableCamera = NGUITools.FindInParents<NGUIDraggableCamera>(gameObject); } }
/// <summary> /// Automatically find the draggable camera if possible. /// </summary> void Awake() { // Legacy functionality support for backwards compatibility if (target != null) { if (draggableCamera == null) { draggableCamera = target.GetComponent <NGUIDraggableCamera>(); if (draggableCamera == null) { draggableCamera = target.gameObject.AddComponent <NGUIDraggableCamera>(); } } target = null; } else if (draggableCamera == null) { draggableCamera = NGUITools.FindInParents <NGUIDraggableCamera>(gameObject); } }