Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

StartSDK Error

Discussion in 'Unity Analytics' started by aluzino1811, Feb 18, 2015.

  1. aluzino1811


    Feb 18, 2015
    Im trying with Unity Analytics but when i put the code i get the next error.

    UnityAnalytics' does not contain a definition for `StartSDK'


    My code:

    using UnityEngine;
    using System.Collections;
    using UnityEngine.Cloud.Analytics;

    public class UnityAnalytics : MonoBehaviour {

    // Use this for initialization
    void Start () {
    const string projectId = "PROJECTID-GOES-HERE-66fb5cf028d728bb";
    UnityAnalytics.StartSDK (projectId);

  2. kentunity


    Unity Technologies

    Sep 16, 2014
    Hi @aluzino1811

    The problem here is that your class name is UnityAnalytics, and our SDK's class name is also UnityAnalytics.
    Just rename your class to something else besides "UnityAnalytics" and it should work.
  3. mbirk


    Unity Technologies

    Apr 25, 2014
    Hi @aluzino1811,

    Also, don't forget to change the "projectId" string to your actual Project ID! Otherwise you won't be able to access any of the data that we collect. You can see this Project ID in the dashboard beneath the project name:
    1. Go the the Unity Analytics dashboard at
    2. Create a new project or click on an existing project.
    3. You can see the Project ID beneath the project name at the top of the page.
    4. If you click on the "Integration" tab in the left sidebar, and then click on "Create Script", you will get a code snippet that is customized for you project, and you can simply copy-paste it into your script.