Ejemplo n.º 1
0
    static void AddHeatMap()
    {
        GameObject go = new GameObject("GA_HeatMap");

        go.AddComponent <GA_HeatMapRenderer>();
        go.AddComponent <GA_HeatMapDataFilter>();
        Selection.activeObject = go;

        GA_Tracking.SendEvent("Added:GA_HeatMap");
    }
Ejemplo n.º 2
0
    static void AddGASystemTracker()
    {
        if (FindObjectOfType(typeof(GA_SystemTracker)) == null)
        {
            GameObject go = new GameObject("GA_SystemTracker");
            go.AddComponent <GA_Gui>();
            go.AddComponent <GA_SpecialEvents>();
            go.AddComponent <GA_SystemTracker>();
            Selection.activeObject = go;

            GA_Tracking.SendEvent("Added:GA_SystemTracker");
        }
        else
        {
            GA.LogWarning("A GA_SystemTracker already exists in this scene - you should never have more than one per scene!");
        }
    }
Ejemplo n.º 3
0
    static void AddGATracker()
    {
        if (Selection.activeGameObject != null)
        {
            if (Selection.activeGameObject.GetComponent <GA_Tracker> () == null)
            {
                Selection.activeGameObject.AddComponent <GA_Tracker> ();

                GA_Tracking.SendEvent("Added:GA_Tracker");
            }
            else
            {
                GA.LogWarning("That object already contains a GA_Tracker component.");
            }
        }
        else
        {
            GA.LogWarning("You must select the gameobject you want to add the GA_Tracker component to.");
        }
    }