Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity Removal of unity.sceneLoad in 2018.1

Discussion in 'Unity Analytics' started by ap-unity, Feb 7, 2018.

  1. ap-unity


    Unity Technologies

    Aug 3, 2016
    Starting in Unity 2018.1, the Analytics system will no longer send the unity.sceneLoad event. We created unity.sceneLoad when we first introduced the Analytics service to provide developers something they could use right away.

    As the product improved and more developers became accustomed to defining their own custom events, it became less necessary to have this default event.

    Our backend has not processed this event since June 2017, with the exception of projects that were using it in a funnel or custom segment. That exception was ended at the end of last year. And in 2018.1, that event will no longer be sent from the editor.

    If you have funnels or custom segments with this event, they will no longer function correctly. You will need to remake them using another custom event.

    This event will also be removed from Raw Data Export files.

    Replacement Event

    If you are interested in capturing this information, there are a few ways you can do so. I would encourage everyone to take a look at Standard Events:

    If you just want to capture whenever a scene is loaded, that's easy enough to do with a custom event. However, just by adding a couple of Standard Events in the right places, you can capture much more meaningful data.

    For example, it is often useful to know how many people start your game after opening it:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.Analytics;
    3. using System.Collections.Generic;
    5. public class Track : MonoBehaviour {
    6.     float timeToLoad = 0;
    8.    void Start () {
    9.         Dictionary<string, object> data = new Dictionary<string, object>();
    10.         //add any other relevant data
    11.         timeToLoad = Time.timeSinceLevelLoad;
    12.         data.Add("timeToLoad", timeToLoad);
    13.         AnalyticsEvent.ScreenVisit(ScreenName.MainMenu, data);
    14.    }
    16.     public void StartGame() {
    17.         Dictionary<string, object> data = new Dictionary<string, object>();
    18.         data.Add("timeToStart", Time.timeSinceLevelLoad - timeToLoad);
    19.         AnalyticsEvent.FirstInteraction(ScreenName.MainMenu.ToString(), data);
    20.     }
    21. }
    You can then use these two events to create a funnel that tracks what percentage of users who visit the Main Menu click to start the game. (This example also gives you a way to track the time for the main menu to load and the time before a player makes their first interaction. You can generate reports with this data in the Data Explorer.)

    There are many other uses for Standard Events. I would recommend checking out the blog series that goes into more depth about the different categories of events:

    As of 2017.3, the full package is now integrated into Unity, so there is no asset package needed.

    If you have any questions about unity.sceneLoad or Standard Events, please let us know.
    unityjingyao likes this.