SunCycle is a dynamic day/night cycle system for VRChat worlds, built with UdonSharp. It allows players to interact with a designated lever to control the time of day, as well as being a decent time cycle script for a directional light.
- 🌞 Smooth day/night cycle with dynamic lighting
- 🕹️ Interactive lever for manual time control
- 🔄 Bi-directional time flow (forward and backward)
- 🎛️ Customizable cycle length and sun intensity
- 🔊 Audio feedback for lever interaction
- 🔄 Network-synced across all players
- 📱 Compatible with both VR and desktop users
- Ensure you have VRChat SDK3 and UdonSharp installed in your Unity project.
- Download the latest release from the Releases page.
- Import the package into your Unity project.
- Drag the
SunLever
prefab into your scene. - Assign your directional light to the
Sun Light
field in the inspector. - Customize the
Cycle Length
andSun Intensity
as desired. - (Optional) Assign a UI Slider to the
Time Slider
field for visual time representation. - Build and test your world!
You can easily customize the SunCycle behavior:
- Cycle Length: Adjust the duration of a full day/night cycle in seconds.
- Sun Intensity: Set the maximum intensity of the sun light.
- Rotation Speed: Control how quickly the lever rotates when interacted with.
- Toggle Objects: Assign GameObjects to be toggled on/off when the lever is activated.
SunCycleLever
prefab: A ready-to-use lever model for easy integration.LeverSound.wav
: Default audio file for lever interaction feedback.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to VRChat and UdonSharp for their invaluable resources and support.
If you encounter any issues or have questions, please open an issue on this repository.
Made with ❤️ for the VRChat community