Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.VariableLinkingExample Class Reference
Inheritance diagram for AC.VariableLinkingExample:

Public Attributes

int myCustomInteger = 2
int variableIDToSyncWith = 0

Detailed Description

This script demonstrates how an AC global variable can be synchronised with a variable in a custom script. To use it, create a new global Integer variable in the Variables Manager, and set its 'Link to' field to 'Custom Script'. Then, place this script in the scene, and configure its Inspector so that the variable's ID matches the 'Variable ID To Sync With' property. Whenever the AC variable is read or modified, it will be synchronised with this script's 'My Custom Integer' property.