Edit Code
Learn how to add code to your Unity project while getting data from the cloud.
Code Example
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CustomBehaviour : MonoBehaviour
{
[HideInInspector]
public Entry entry;
/// <summary>
/// EXAMPLE BEHAVIOUR
/// Queries the database and names the object based on the result.
/// </summary>
// Use this for initialization
void Start()
{
// Add RemoteTransformations script to object and set its entry
this.gameObject.AddComponent<RemoteTransformations>().entry = entry;
// ADD YOUR CODE HERE //
// Qurey additional data to get the name
string value = "";
if (entry.getAdditionalData() != null &&
entry.getAdditionalData().TryGetValue("name", out value))
{
// Set name
this.gameObject.name = value;
}
}
// Update is called once per frame
void Update()
{
}
}Querying Metadata


Posting Metadata
Subscribing for Metadata Changes
Last updated