Documentation & Tutorials
  • Pivec Labs Documentation & Tutorials
  • Assets for Game Creator 1
    • Action Pack 1
      • Action List
        • Misc Actions
        • Object Actions
        • TMP Actions
      • Examples
        • Example 1 TMP
        • Example 2 Objects
        • Example 3 Actions
    • Action Pack 2
      • Action List
        • Camera Actions
        • Graphics Actions
        • Audio Actions
        • Video Actions
      • Triggers
      • Components
      • Examples
        • Example 1 - Camera
        • Example 2 - Camera FPS
        • Example 3 - Graphics
        • Example 4 - Sounds
        • Example 5 - Audio Player
        • Example 6 - Video Player
    • Action Pack 3
      • Action List
        • Day/Night Cycle
        • Light Control
      • Components
      • Examples
        • Example 1 - Day Night Cycle
        • Example 2 - Light Control
    • Accessibility Module
      • Components
      • Setup
      • Auditory Aids
        • Closed Captions for Sounds
        • Volume Control with Tags
        • Multiple Volume Controls
      • Motoric Aids
        • Configurable Tank Camera
        • On-Screen Multi-Function Joystick
        • Dynamic Touchstick
        • Multi-Function Touchstick
      • Cognitive Aids
        • Parental Controls with Password
        • Dyslexia Font Options
        • Motion Sickness Prevention
        • Gameplay Speed and Sensitivity
      • Visual Aids
        • Colour Picker
        • Variable Text Size
        • Object Outlining
        • Colour Switching
        • Colour Correction
    • Mobile Components
      • Actions
        • Haptics
        • Camera
        • TouchSticks
        • Gyroscope
        • Utilities
      • Triggers
        • Touch Gestures
      • Conditions
      • Components
      • Prefabs
      • Examples
        • Example 1 Haptics
        • Example 2 Cameras
        • Example 3 Gestures
        • Example 4 Controls
        • Example 5 Steering Wheel/Pedals
        • Example 6 Gyroscope Controls
        • Example 7 Gyroscope Camera
        • Example 8 Utilities
        • Example 9 AutoRun
      • Extras
    • UI Components
      • Canvas Components
        • Canvas Animations
        • 3D Models on a Canvas
        • Video on a Canvas
      • Animating UI Elements
        • Cross Fade Elements
        • Slide Elements
        • Shake UI Element
        • Tooltips
      • Text Mesh Pro & uGUI Text
      • Colour Picker Component
      • Mini Map Component
        • MiniMap QuickStart
        • Fullscreen Map
        • Adding Markers
        • Adding Labels
      • System Info Panel
        • SysInfo Quickstart
        • Using SysInfo Toggle
      • Main Menu Templates
        • Customising the Prefabs
        • Load/Save System
        • Comic Strip Example
    • Developer Tools
      • Time Manager
        • Actions & Conditions
      • Waypoint System
      • Click to Spawn Objects
      • In-Game Console
      • In-Game Screen Capture
    • Turn Based Module
    • VR Module GC1
  • Assets for Unity
    • Developer Tools for Unity
      • Click to Spawn
      • In-Game Screen Capture
      • In-Game Console
    • Mini Map System
      • MiniMap Quickstart
      • Map Parameters
      • Adding Makers
  • Tutorials
    • Tutorials for Game Creator 1
      • Installing and Updating Modules
      • Adding Actions to the Button Bar
      • Changing the Graphics for TouchStick
      • Adding Passwords to Player Actions
      • Using the Colour Picker with Variables
      • Creating a 3D Inspection Panel for Game Objects
      • Customising the UI MiniMap
      • Creating a toggle for the SysInfo Panel
      • Simple Player Run on Left Shift Down
      • Pan Follow Camera with Keyboard
    • Tutorials for Unity
  • ANNEX
    • Roadmap
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Assets for Game Creator 1
  2. Action Pack 3
  3. Examples

Example 1 - Day Night Cycle

PreviousExamplesNextExample 2 - Light Control

Last updated 3 years ago

Was this helpful?

Example 1 shows how to utilise the Day/Night manager system with Game Creator. The Day/Night manager component must be added to your scene and this is easily done by creating an empty Game Object and adding the component.

You will also see that in the example, we have added a Sun and Moon object using Unity's Light components. These are then added to the Visual Settings in the Manager script. The Moon is optional.

The start time and start day can be configured from GC Variables or just added as a value. The advantage of using Variables, is that you can increment them and allow the game to start from the same time/day as it was when the game was saved. Real Time speed can also be used, or you can use your own minutes per day. By allowing this to be a variable, you could also let your player set their own time speed. The Sun curve lets you change when the sun rises and sets, and the Season setting changes the path of the sun through the sky. You can also allow the Skybox to rotate, and this can imitate moving clouds.

Finally, there is the ability to execute Actions. These Actions are created as any Actions are, and then dragged into the Action to Execute slot. You can chose which day of the week, what Hour and minute, or allow it to happen everyday. As shown in the example. we have an Action to start rain, and then to stop rain, and Action to start snow, and to stop snow, and an Action to rotate the day skybox, and to swap the skybox to night time.

This Module comes with many other useful Actions. You can advance the time of day, change the sun intensity, change the weather, and even set the terrain texture. Procedural Skyboxes can to modified, the time (virtual game time) can be saved at any point in your game.

Please review the Actions we have used in this example and experiment with them to learn more.