{"_id":"594949e92be16d0026ec0548","category":{"_id":"594949e62be16d0026ec04cf","version":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"user":"571fa519db52d01700f5cf3d","parentDoc":null,"project":"571fa55ca0acd42000af9545","version":{"_id":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":2,"createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["594949e62be16d0026ec04ce","594949e62be16d0026ec04cf","594949e62be16d0026ec04d0","594949e62be16d0026ec04d1","594949e62be16d0026ec04d2","594949e62be16d0026ec04d3","594949e62be16d0026ec04d4","594949e62be16d0026ec04d5","594949e62be16d0026ec04d6","594949e62be16d0026ec04d7","594949e62be16d0026ec04d8","594949e62be16d0026ec04d9","594949e62be16d0026ec04da","594949e62be16d0026ec04db","594949e62be16d0026ec04dc","594949e62be16d0026ec04dd","594949e62be16d0026ec04de","594949e62be16d0026ec04df","594949e62be16d0026ec04e0","594949e62be16d0026ec04e1","59497219f4a8980024dd0631"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Kunekune","version_clean":"3.2.0","version":"3.2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-31T16:56:44.225Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"## Overview\n\nThis canvas adds a frames per second text element to the headset. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas:\n\n* Select `FramesPerSecondCanvas` object from the scene objects\n* Find the `Canvas` component\n* Set the `Render Camera` parameter to the camera used by the VR Headset (e.g. SteamVR: [CameraRig]-> Camera(Head) -> Camera(eye)])\n\nThis script is pretty much a copy and paste from the script at: http://talesfromtherift.com/vr-fps-counter/ So all credit to Peter Koch for his work. Twitter: :::at:::peterept\n\n## Inspector Parameters\n\n * **Display FPS:** Toggles whether the FPS text is visible.\n * **Target FPS:** The frames per second deemed acceptable that is used as the benchmark to change the FPS text colour.\n * **Font Size:** The size of the font the FPS is displayed in.\n * **Position:** The position of the FPS text within the headset view.\n * **Good Color:** The colour of the FPS text when the frames per second are within reasonable limits of the Target FPS.\n * **Warn Color:** The colour of the FPS text when the frames per second are falling short of reasonable limits of the Target FPS.\n * **Bad Color:** The colour of the FPS text when the frames per second are at an unreasonable level of the Target FPS.\n\n## Example\n\n`VRTK/Examples/018_CameraRig_FramesPerSecondCounter` displays the frames per second in the centre of the headset view. Pressing the trigger generates a new sphere and pressing the touchpad generates ten new spheres. Eventually when lots of spheres are present the FPS will drop and demonstrate the prefab.","excerpt":"","slug":"framespersecondcanvas","type":"basic","title":"Frames Per Second Viewer"}

Frames Per Second Viewer


## Overview This canvas adds a frames per second text element to the headset. To use the prefab it must be placed into the scene then the headset camera needs attaching to the canvas: * Select `FramesPerSecondCanvas` object from the scene objects * Find the `Canvas` component * Set the `Render Camera` parameter to the camera used by the VR Headset (e.g. SteamVR: [CameraRig]-> Camera(Head) -> Camera(eye)]) This script is pretty much a copy and paste from the script at: http://talesfromtherift.com/vr-fps-counter/ So all credit to Peter Koch for his work. Twitter: @peterept ## Inspector Parameters * **Display FPS:** Toggles whether the FPS text is visible. * **Target FPS:** The frames per second deemed acceptable that is used as the benchmark to change the FPS text colour. * **Font Size:** The size of the font the FPS is displayed in. * **Position:** The position of the FPS text within the headset view. * **Good Color:** The colour of the FPS text when the frames per second are within reasonable limits of the Target FPS. * **Warn Color:** The colour of the FPS text when the frames per second are falling short of reasonable limits of the Target FPS. * **Bad Color:** The colour of the FPS text when the frames per second are at an unreasonable level of the Target FPS. ## Example `VRTK/Examples/018_CameraRig_FramesPerSecondCounter` displays the frames per second in the centre of the headset view. Pressing the trigger generates a new sphere and pressing the touchpad generates ten new spheres. Eventually when lots of spheres are present the FPS will drop and demonstrate the prefab.