Forum Discussion
drash
12 years agoHeroic Explorer
Basic Unity scripts for Rift demos
I'm guessing everyone developing with Unity eventually starts putting together useful scripts to add to their library for re-use and to speed up prototyping. I'm still learning Unity, but I've got a few scripts I'd like to share. Perhaps others could do the same?
I'll start with a pretty basic one called "Rift Demo Basics" that comes in the form of a tiny prefab that:
Download: RiftDemoBasics.unitypackage
I noticed several people relying on video capture software like Fraps to show the framerate of a demo, and others have lamented the lack of ability to turn vsync on/off in a demo (by default they are on in Unity demos with Rift integration). And of course, many demos don't hide their immersion-breaking mouse cursor, which for me personally is a pain to move it out of the way so that I can't see it, and at the same time try not to move it to the edge of the screen which does things in Windows 8.
The Unity package at the link above comes with a "Root" prefab which you can just drag into your scene hierarchy and it's set up to hide your mouse, turn vsync off, and show a framerate indicator in the upper right (can't be seen when wearing Rift).
Hope this helps someone!
I'll start with a pretty basic one called "Rift Demo Basics" that comes in the form of a tiny prefab that:
- Lets you show/hide a frame-rate indicator (Configurable),
- Lets you toggle Unity vsync (Configurable),
- Hides your mouse cursor,
- Makes it so that hitting Escape will quit (Configurable).
Download: RiftDemoBasics.unitypackage
I noticed several people relying on video capture software like Fraps to show the framerate of a demo, and others have lamented the lack of ability to turn vsync on/off in a demo (by default they are on in Unity demos with Rift integration). And of course, many demos don't hide their immersion-breaking mouse cursor, which for me personally is a pain to move it out of the way so that I can't see it, and at the same time try not to move it to the edge of the screen which does things in Windows 8.
The Unity package at the link above comes with a "Root" prefab which you can just drag into your scene hierarchy and it's set up to hide your mouse, turn vsync off, and show a framerate indicator in the upper right (can't be seen when wearing Rift).
Hope this helps someone!
7 Replies
- cyberealityGrand ChampionCool. Looks like it's working good.
- NedoExplorerI just started with Unity, but this sounds very good! My expirience with some Demos the ESC dont work
and/or Mouse sitting in front, thats really annoying.
Thanx! - rmartoriHonored GuestThank you, this will help me as I learn unity for my projects.
- AnonymousInteresting post, it's a pity it is not so partecipated.
I'm trying to do my first OR Unity games in these days, as soon I have something useful I'll post it here :) - drashHeroic ExplorerI thought I would add my own VR-friendly skysphere package. There's already two that I know of on these forums:
Nora's script apparently works great and can be found here.
adam posted a packaged version of the skybox that can be found in the Tuscany Unity demo scene here.
My own basic skysphere script that I use for rapid prototyping can be downloaded here, although it is geared toward using a single a single texture as your backdrop drawn on the inside of a sphere. A script for keeping it centered on your view is included. To use, drag the "Skysphere" prefab into your scene and check out the included readme for some tips on getting the most out of it."0perator3" wrote:
I'm trying to do my first OR Unity games in these days, as soon I have something useful I'll post it here :)
Glad to hear it 0perator3, looking forward to seeing what you come up with. :) - ZephemusHonored GuestThanks for the unity package.
- CubicleNinjasProtegeI've been lurking here for months, but had to say: Drash, you rock!
Thanks so much for sharing these wonderful scripts. These are big pet peeves and will make VR experience better for everyone.
And also crazy thanks for providing my first 'wow!' VR experience with Titans! :D
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 months ago
- 10 months ago
- 9 months ago