Gamespark Framework documentation:
Contain multiple submodules:
CharacterCache: this is where we define our character models available to the players in unity
CharacterLogic: Attach to you character model to be able to rebuild their configuration
GsfCharacterCreation: Logic to define data of your character & send it to cloud code.
GsfCharacterLoader: let you load and rebuild the configuration of your created player or from an other remote player. If you are trying to load a remote character the events will be used by GsfCharacterLoader, if it is a local character it will be used by SpawnLocalCharacter.
LocalCharacterCamera & LocalPlayerInput: Allow you to control you local players
UiCharacterFindRemote Allow the player to interact with a Ui panel to find players by name or random players if no name is specified.
UiCharacterHud is used to display information that are associated with the local player such as experience.
UiCharacterLoad let the player decide which character to play.
How can I add AI to the remote player?
In the demo the character logic will enable the component to let the character randomly walk around. This is used in many social game to fake the sense of real time multiplayer like having random player attacking your base while you are around.
You can then very easily come up with more advanced AI and add it upon character loading in a component that extend Invokable:
public class InvokableRandomWalk : Invokable
const float MaxRange = 10;
[SerializeField] private NavMeshAgent _agent;
[SerializeField] private Animator _animator;
private Vector3 _cachedPosition;
public override void InvokeLogic()
_cachedPosition = transform.position;
_agent.enabled = true;
Vector3 destination = GetRandomPosition();
yield return new WaitForEndOfFrame();
while (_agent.isOnNavMesh && _agent.remainingDistance > 0.5f)
yield return null;
private void OnReachedDestination()
private Vector3 GetRandomPosition()
Vector3 pos = _cachedPosition;
pos.x += Random.Range((MaxRange * -1), MaxRange);
pos.z += Random.Range((MaxRange * -1), MaxRange);