Dear Unity Community,
I'm attempting to build custom events in Unity 4.6 using the Unity Analytics SDK. The basic integration has gone fine, but when I try to use the demo code to create custom events, it throws an "Unexpected symbol '(' " error. I'm pretty sure I'm missing a { or a ; somewhere, but I can't seem to see it.
Any help would be appreciated. Thanks in advance!
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Cloud.Analytics;
public class PlayTheClip : MonoBehaviour
{
private float m_WaitTime = 1.0f;
private string movie_url;
int isFirst;
int leftEarly;
private bool m_bStartedMovie = false;
UnityAnalytics.CustomEvent("movieFinished", new Dictionary
{
{ "FirstTime", isFirst },
{ "QuitFast", leftEarly }
});
void Awake()
{
isFirst = 1;
leftEarly = 0;
}
↧