SteamVR Unity Plugin
This is the class by class, member by member documentation for the SteamVR Unity Plugin. It is not complete. If you would like summary or example information for a specific class or member please post a request in the Issues section of the github repo.
SteamVR_Settings
Located in Assets/SteamVR/Resources you will find a SteamVR_Settings asset that has a couple setting on it you may find useful. Namely when the input system updates the actions. It also contains a boolean that decides whether to automatically enable VR for the project. If you have this plugin installed and are trying to disable VR you will need to uncheck this box first.
SteamVR_Actions
The Actions class will be generated for you when you hit "Save and Generate" in the SteamVR Input window. It gives you named access to all your actions. For example, if you have an action named Plant in the action set Farming you can access it through the actionset at SteamVR_Actions.Farming.Plant or just at the root of the class at SteamVR_Actions.Farming_Plant.
SteamVR_Input
Here is where most of the helper functions live to access your actions in code. You can get a reference to a specific action by name through a generic function GetAction<SteamVR_Action_Boolean>("Plant")
or through a type-named function GetBooleanAction("Plant")
. You can also pass in the full path to the action: GetActionByPath<SteamVR_Action_Boolean>("/Farming/in/Plant")
if you have a lot of actions or want the best performance. These classes are nice because they give you access to common events and faster data access. But if you'd rather just access the data directly instead of going through the action class you can use more familiar calls GetStateDown("Plant", SteamVR_Input_Sources.LeftHand)
. Different than normal Unity input you'll need to pass in the Input Source you want to get the data from. That can be Any, or quite a number of more specific sources (LeftHand, RightHand, etc). Any will combine all sources (OR'd) in to one set of data.
SteamVR_Behaviour
This is the component that manages most of the input system in relation to unity events. You shouldn't generally need to interact with it besides making sure it's in your scenes and doesn't get accidentally deleted. It should be automatically added to a scene at runtime when one isn't found.
SteamVR_Behaviour_Pose
The pose behaviour component is what orients tracked objects. Add this to a GameObject to automatically set the position and rotation of the transform to match your tracked object (usually controllers). It also contains velocity data and a variety of helper functions for common orientation functions.
SteamVR_Behaviour_Skeleton
Uses SteamVR Skeleton Input to give you a hand that is our best guess of where each joint is at that time. Varies in accuracy depending on the controller and tracking system currently being used. This can also orient the GameObject inline with the controller. So you don't need a pose and a skeleton behaviour on the same object.
SteamVR_Behaviour_Boolean / Single / Vector2 / Vector3
These are components designed to give you easy access to an action by the same name and a place to use UnityEvents if that is your preference. They also have some helpful functions designed around common scenarios for those actions. If you find yourself running into things you wish these helper components had, feel free to create an Issue on the github.