Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

How to use Analytics.CustomEvent?

$
0
0
Hi, I'm trying to set up my project with Unity Analytics (I'm in version 5.4.2, and using Javascript), and I've gotten stuck on using Analytics.CustomEvent. The documentation doesn't explain it too well (and not at all in javascript), and everything I try results in an error. Here is the function I'm trying to track: function LoadLevel (lvl:int) { SceneManager.LoadScene(lvl, LoadSceneMode.Single); UnityEngine.Analytics.Analytics.CustomEvent("Level Loaded", new Dictionary()); } When it compiles this, I get the error: Assets/Scripts/Menu/MenuScript.js(30,73): BCE0005: Unknown identifier: 'Dictionary'. I've searched and searched on this topic but most everything is either in c# or an older version of Unity. Is there something I have to import in order to use "Dictionary"? Also, I don't really understand what a "Dictionary" is... I've searched the Unity documentation, but I can't find anything there. If anyone has a good understanding of what it is, I'd really appreciate a quick summary. Thanks in advance!

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>