World Manager API and Unity Timeline
- Make your scene.
- Plug in CTS and Enviro and switch on WAPI integration.
- From Enviro we get dynamic lighting, time of day, clouds, weather, fog, scattering, rain, snow and from CTS we get terrain that responds to rain and snow.
- Then create a new Timeline, add a Game Time Track, and add the various Weather tracks, blend them together and stick it on repeat.
Time to set this up – 5 minutes. Check the videos further down this page for an example of what can be done, and how to do it.
The alternative… read the Enviro documentation, read the CTS documentation, create your own time and weather management system and then get busy coding doing the integration…. weeks later lets see how you are travelling…
WHAT DOES IT DO?
- Provides a common way to describe your scene
- Provides a common way to describe and control game time
- Provides a common way to describe and control weather
At its heart WAPI is a set of useful global variables with a subscription based messaging system bolted on, and because of this, control can be mixed and matched to suit your game.
- Your Game -> WAPI -> Environment
- Timeline -> WAPI -> Your Game, Environment
- Timeline, Your Game -> WAPI -> Environment
- Environment -> WAPI -> Your Game, Other Environment Parts
BENEFITS FOR GAME DEVELOPERS:
- FREE, Open Source!
- One simple and generic API
- Add or remove compatible 3rd party assets easily and have them ‘just work’
- Or alternatively, provide a common way to integrate them into your game
- Control everything script free via Timeline
- Saves time and reduce complexity!
BENEFITS FOR PUBLISHERS:
- FREE, Open Source!
- One simple and generic API
- Extend your audience reach
- Lower your support burden
- Simple integration – check the sample code here!
BUT MY SYSTEM IS DIFFERENT!?
No problem. You can still configure your assets individually to your own taste to do your own thing, the only thing that WAPI does is ensure that command and control is centralized through one API and in a generic way.
Assets which implement API support can choose which parts they implement and regardless of how much they support, you will get value from this system because of the way it coordinates their behavior.
API CATEGORIES COVERED:
- Game Time
- Player Location
- Scene Attributes, Sea Level, Latitude & Longitude
- Temperature and humidity
- Sound Levels
WAPI is integrated with Unity Timeline, via the Playable’s API.
In the video sample below, Timeline controls WAPI for game time, fog, rain and snow, and Cinemachine for the shots and Post FX – it was done from end to end with Zero Coding!
This next video provides a high level introduction to WAPI and shows an overview of how the first video was constructed and which assets were used.
The assets used here are:
- Unity Timeline – playback control
- Unity Cinemachine – camera control
- Unity Post Processing Stack – post effects
- World Manager API – Environmental command and control
- CTS – Shades the terrain and responds to WAPI weather events
- Enviro – Lighting, clouds, fog, scattering, rain, snow in response to WAPI events
- Gaia & GeNa – Created the environment
- AQUAS – water
- 3D Forge Village Exteriors Kit – houses and props
- Turboscalpeurs Grasses – grass and flowers
- Motoproprios Rocks – rocks
- Emerald AI – Deer and monstor control
- SpeedTree Desktop Trees Package – Trees
- Unluck Bird Flocks Pack – Birds and butterflies
- Protofactor Animals Full Pack & Heroic Fantasy Creatures – Deer and monstors
- SE Screen Space Shadows – Grass shadows
- Helios – Video rendering.
WAPI introduces and manages a global set of shader variables. Any shader that conforms to the WAPI standard will be updated automatically when settings change without needing the the message subscription system.
OPEN SOURCE & SOURCE CODE:
WAPI is Open Source under the MIT licence, under active development, and will be released on the asset store as well soon for convenience. To get your own copy of WAPI go to the� WAPI Github page and download it.
When you grab the source code – take a look at the demo scene and the sample integration. It is very easy to implement.
API USAGE PATTERN:
To enable or disable World Manager (and all events and update / lateupdate):
- WorldManager.Instance.WorldAPIActive = true/false;
To generate events, and get and set values use the following generic format:
- WorldManager.Instance.Property = value;
- value = WorldManager.Instance.Property
To receive events when values are changed implement your own listener via the IWorldApiChangeHandler interface and then choose which events you want to listen to:
CTS – Complete Terrain Shader
If you would like your favourite asset to support this as well, then please ask the author to contact me. Its usually only a few minutes to set up.
STAY IN THE LOOP!
If you would like to be kept up to date about how WAPI is evolving, and and get access to my free monthly tips, tricks, news reviews and freebies newsletter then please sign up on my home page.