public void Start () { switch (traceFormat) { case "json": this.traceFormatter = new SimpleJsonFormat (); break; case "xapi": this.traceFormatter = new XApiFormat (); break; default: this.traceFormatter = new DefaultTraceFromat (); break; } filePath = GeneratePath (); switch (storageType) { case "net": filePath += "Pending"; mainStorage = new NetStorage (this, host, trackingCode); mainStorage.SetTracker (this); backupStorage = new LocalStorage (filePath); backupStorage.SetTracker (this); break; default: mainStorage = new LocalStorage (filePath); mainStorage.SetTracker (this); break; } this.startListener.SetTraceFormatter (this.traceFormatter); this.Connect (); this.nextFlush = flushInterval; UnityEngine.Object.DontDestroyOnLoad (this); }
public void Start() { switch (traceFormat) { case "json": this.traceFormatter = new SimpleJsonFormat(); break; case "xapi": this.traceFormatter = new XApiFormat(); break; default: this.traceFormatter = new DefaultTraceFromat(); break; } switch (storageType) { case "net": storage = new NetStorage(this, host, trackingCode); break; default: String path = Application.persistentDataPath; #if UNITY_ANDROID AndroidJavaObject env = new AndroidJavaObject("android.os.Environment"); AndroidJavaObject file = env.CallStatic <AndroidJavaObject>("getExternalStorageDirectory"); path = file.Call <String>("getAbsolutePath"); #endif if (!path.EndsWith("/")) { path += "/"; } path += "traces"; if (debug) { Debug.Log("Storing traces in " + path); } storage = new LocalStorage(path); break; } storage.SetTracker(this); this.startListener.SetTraceFormatter(this.traceFormatter); this.Connect(); this.nextFlush = flushInterval; UnityEngine.Object.DontDestroyOnLoad(this); }
/// <summary> /// DONT USE THIS METHOD. UNITY INTERNAL MONOBEHAVIOUR. /// </summary> public void Start() { switch (traceFormat) { case "json": this.traceFormatter = new SimpleJsonFormat(); break; case "xapi": this.traceFormatter = new XApiFormat(); break; default: this.traceFormatter = new DefaultTraceFromat(); break; } filePath = GeneratePath(); rawFilePath = filePath + "Raw.csv"; switch (storageType) { case "net": filePath += "Pending"; mainStorage = new NetStorage(this, host, trackingCode); mainStorage.SetTracker(this); backupStorage = new LocalStorage(filePath); backupStorage.SetTracker(this); break; default: mainStorage = new LocalStorage(filePath); mainStorage.SetTracker(this); break; } this.startListener.SetTraceFormatter(this.traceFormatter); this.Connect(); this.nextFlush = flushInterval; UnityEngine.Object.DontDestroyOnLoad(this); }
public void Start () { switch (traceFormat) { case "json": this.traceFormatter = new SimpleJsonFormat (); break; case "xapi": this.traceFormatter = new XApiFormat (); break; default: this.traceFormatter = new DefaultTraceFromat (); break; } switch (storageType) { case "net": storage = new NetStorage (this, host, trackingCode); break; default: String path = Application.persistentDataPath; #if UNITY_ANDROID AndroidJavaObject env = new AndroidJavaObject("android.os.Environment"); AndroidJavaObject file = env.CallStatic<AndroidJavaObject>("getExternalStorageDirectory"); path = file.Call<String>("getAbsolutePath"); #endif if (!path.EndsWith ("/")) { path += "/"; } path += "traces"; if (debug) { Debug.Log ("Storing traces in " + path); } storage = new LocalStorage (path); break; } storage.SetTracker (this); this.startListener.SetTraceFormatter (this.traceFormatter); this.Connect (); this.nextFlush = flushInterval; UnityEngine.Object.DontDestroyOnLoad (this); }
public void SetTraceFormatter(ITraceFormatter traceFormatter) { this.traceFormatter = traceFormatter; }