Use this guide only if you want to use Playmaker and target WEBGL platform
- Complete WebGl setup by following this guide
- Import Playmaker asset
- Open SampleScene and attach Playmaker FSM to DatabaseLiveUpdate GameObject. Open FSM and add a new "BGDatabaseDataLoaded" Event. Use this event to pass control to "DatabaseLoaded" state.
-
Open LiveUpdatePreloader.cs script and put this code inside Ready method:
GetComponent<PlayMakerFSM>().Fsm.Event("BGDatabaseDataLoaded");
. "BGDatabaseDataLoaded" Playmaker event will be fired after data is loaded. - Generate Playmaker actions for accessing database data.
-
"DatabaseLoaded" state will be executed when data is loaded from GoogleSheet.
To keep things simple, we will update UIText component with a number of loaded rows,
using generated
P_Test Count
action - Setup is complete! Now build the project, run HTTP server and check if number 4 is displayed in your browser, as described in WEB-GL guide