{"_id":"5b1f96169c68300003297b74","project":"571fa55ca0acd42000af9545","version":{"_id":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"category":{"_id":"5b1f8576c2505d0003125431","version":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-01T17:01:47.129Z","from_sync":false,"order":14,"slug":"utilities","title":"Utilities"},"user":"571fa519db52d01700f5cf3d","githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-12T09:44:54.021Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"> extends VRTK_SDKControllerReady\n\n## Overview\n\nThe SDK Object State script can be used to set the enable/active state of a GameObject or Component based on SDK information.\n\nThe state can be determined by:\n * The current loaded SDK setup.\n * The current attached Headset type.\n * The current attached Controller type.\n\n## Inspector Parameters\n\n * **Target:** The GameObject or Component that is the target of the enable/disable action. If this is left blank then the GameObject that the script is attached to will be used as the `Target`.\n * **Object State:** The state to set the `Target` to when this script is enabled. Checking this box will enable/activate the `Target`, unchecking will disable/deactivate the `Target`.\n * **Loaded SDK Setup:** If the currently loaded SDK Setup matches the one provided here then the `Target` state will be set to the desired `Object State`.\n * **Headset Type:** If the attached headset type matches the selected headset then the `Target` state will be set to the desired `Object State`.\n * **Controller Type:** If the current controller type matches the selected controller type then the `Target` state will be set to the desired `Object State`.\n\n## Class Methods\n\n### SetStateByControllerReference/1\n\n  > `public virtual void SetStateByControllerReference(VRTK_ControllerReference controllerReference)`\n\n * Parameters\n   * `VRTK_ControllerReference controllerReference` - A controller reference to check for the controller type of.\n * Returns\n   * _none_\n\nThe SetStateByControllerReference method sets the object state based on the controller type of the given controller reference.","excerpt":"","slug":"vrtk_sdkobjectstate","type":"basic","title":"VRTK_SDKObjectState"}

VRTK_SDKObjectState


> extends VRTK_SDKControllerReady ## Overview The SDK Object State script can be used to set the enable/active state of a GameObject or Component based on SDK information. The state can be determined by: * The current loaded SDK setup. * The current attached Headset type. * The current attached Controller type. ## Inspector Parameters * **Target:** The GameObject or Component that is the target of the enable/disable action. If this is left blank then the GameObject that the script is attached to will be used as the `Target`. * **Object State:** The state to set the `Target` to when this script is enabled. Checking this box will enable/activate the `Target`, unchecking will disable/deactivate the `Target`. * **Loaded SDK Setup:** If the currently loaded SDK Setup matches the one provided here then the `Target` state will be set to the desired `Object State`. * **Headset Type:** If the attached headset type matches the selected headset then the `Target` state will be set to the desired `Object State`. * **Controller Type:** If the current controller type matches the selected controller type then the `Target` state will be set to the desired `Object State`. ## Class Methods ### SetStateByControllerReference/1 > `public virtual void SetStateByControllerReference(VRTK_ControllerReference controllerReference)` * Parameters * `VRTK_ControllerReference controllerReference` - A controller reference to check for the controller type of. * Returns * _none_ The SetStateByControllerReference method sets the object state based on the controller type of the given controller reference.