Understanding State
State management is very important if you want your app to be correctly reset between users and compatible with on-demand media production.
If your app is only support the video stream functionality of OmniStream you just need to make sure your scene/level is reset on the disconnect event.
When processing state you can chose to only process new state by selecting "Do Current State Compare" on Process State. This will be more optimal if all your commands ate valid state rather than event triggers.
OmniStream State management
The diagram below shows the flow of state between your webpage and application.
In your app you need to make sure all state requests notify the state manager via "Process State". State values should always be absolute and not relative. Then on state change complete you must notify the state manager and your connect webpage. This can be done instantly on state read or using the delayed "Confirm State Change" call.
State to consider
- Environment change
- Time of Day change
- Configuration update
- Animation play (animation frame)
- Camera (name/id or pos/rot/fov)
Debug State
You can dump the state at any point by calling the "Dump State" function which will create a text file containing all json's used in the state management.