From 63ed7b63712adcae57ba8159442ac86ced3d8fb9 Mon Sep 17 00:00:00 2001 From: "Theston E. Fox" Date: Mon, 19 Sep 2016 14:27:01 +0100 Subject: [PATCH] fix(DOCUMENTATION): add missing controls content handler docs The documentation for the 3D controls content handler was missing due to the header of the file being named incorrectly. This has now been updated and the documentation regenerated. --- .../3D/Utilities/VRTK_ContentHandler.cs | 2 +- DOCUMENTATION.md | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Assets/VRTK/Scripts/Controls/3D/Utilities/VRTK_ContentHandler.cs b/Assets/VRTK/Scripts/Controls/3D/Utilities/VRTK_ContentHandler.cs index 6eab078a0..2311be4ae 100644 --- a/Assets/VRTK/Scripts/Controls/3D/Utilities/VRTK_ContentHandler.cs +++ b/Assets/VRTK/Scripts/Controls/3D/Utilities/VRTK_ContentHandler.cs @@ -1,4 +1,4 @@ -// Slider|Controls3D|0080 +// Content Handler|Controls3D|0090 namespace VRTK { using UnityEngine; diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 6db87a44f..0b355f06a 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -2774,6 +2774,7 @@ All 3D controls extend the `VRTK_Control` abstract class which provides common m * [Lever](#lever-vrtk_lever) * [Spring Lever](#spring-lever-vrtk_spring_lever) * [Slider](#slider-vrtk_slider) + * [Content Handler](#content-handler-vrtk_contenthandler) --- @@ -3033,3 +3034,23 @@ The script will instantiate the required Rigidbody and Interactable components a --- +## Content Handler (VRTK_ContentHandler) + +### Overview + +Manages objects defined as content. When taking out an object from a drawer and closing the drawer this object would otherwise disappear even if outside the drawer. + +The script will use the boundaries of the control to determine if it is in or out and re-parent the object as necessary. It can be put onto individual objects or the parent of multiple objects. Using the latter way all interactable objects under that parent will become managed by the script. + +### Inspector Parameters + + * **Control:** The 3D control responsible for the content. + * **Inside:** The transform containing the meshes or colliders that define the inside of the control. + * **Outside:** Any transform that will act as the parent while the object is not inside the control. + +### Example + +`VRTK/Examples/025_Controls_Overview` has a drawer with a collection of items that adhere to this concept. + +--- +