Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Exclude or Filter Out Unity Editor

Discussion in 'Unity Analytics' started by SureSight, Jun 22, 2015.

  1. SureSight

    SureSight

    Joined:
    Aug 2, 2013
    Posts:
    54
    We seem to be getting some noise from the dev team when testing in the editor. Ideally only analytics from real users in the built project should be reported.

    Is there a way to turn off analytics when running in the Unity Editor or filtering the editor results out from the dashboard?
     
  2. elie-noune

    elie-noune

    Unity Technologies

    Joined:
    Apr 27, 2015
    Posts:
    20
    Hey @SureSight,

    We don't support this today but isolating test data from the editor is something we plan to do in the future. The closest solution at the moment is to create 2 different projects, one for 'dev' and the other one for 'prod'. We were thinking of logging the data that comes from the editor under a 'test users' segment that we would exclude from all other segments by default, but still make it available. Would you want to be looking at data for 'test users' or would it be enough if we just excluded that from your users and didn't make it available? I'd love to understand what you're trying to accomplish.
     
  3. SureSight

    SureSight

    Joined:
    Aug 2, 2013
    Posts:
    54
    Hi @elie.noune

    I can see a segment for 'test users' might be useful in future, but our immediate concern is isolating data from real users in the wild so we can draw some meaningful information from our target audience.

    The game is currently in pre-alpha and we're hoping to get some useful balancing insights from analytics to help us nail down some game features.

    I worry that the editor sessions for the programmer and 3D artist will skew this real data to be less reliable since we typically only run the game in 1 test level to test small features in isolation.
     
  4. elie-noune

    elie-noune

    Unity Technologies

    Joined:
    Apr 27, 2015
    Posts:
    20
    That makes sense @SureSight, thanks for the explanation. Unfortunately, there's no quick fix to this situation from our end at the moment. The only thing that can be done is creating a different project id for development purposes and having your team test on that one instead of the 'production' project.
     
  5. sebastiansgames

    sebastiansgames

    Joined:
    Mar 25, 2014
    Posts:
    99
    I'd like to second this request. I suppose it's easy enough to just turn analytics off when i'm actually developing and turn on again before building, but analytics gathered during the development process in editor are not very useful to me at all (as any dev can tell you, you become an expert at dying in your own game on purpose to test random things).

    The solution of having a 'test users' flag or an 'in editor' flag would definitely work for me.

    Better yet, how bout a quick checkbox/toggle in the editor nav for analytics on/off?

    Thank you!
     
  6. mpinol

    mpinol

    Unity Technologies

    Joined:
    Jul 29, 2015
    Posts:
    315
    sebastiansgames likes this.
  7. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    296
    As a short term solution, if you don't require any stats from the editor then could you not wrap the initialisation call in a platform dependant #if !UNITY_EDITOR ?

    Though I've not spent much time with the analytics since prior to 5.1 and can't recall if the initialisation still needs coding? (apologies if not :p)
     
  8. Pawl

    Pawl

    Joined:
    Jun 23, 2013
    Posts:
    93
    +1, at the very least I would say having an 'IsTrackingEnabled' bool to disable editor tracking is essential. Filtering them under a different category would be nice to have, but not required.

    However if it's not supported at the Unity level, it's easy to wrap all calls at the game level via some GameAnalyticsIntegration class and use your own #if UNITY_EDITOR define to disable tracking as desired.
     
  9. MatrixGuo

    MatrixGuo

    Joined:
    May 2, 2015
    Posts:
    1
    I have also some problems fron UnityEditor when building in platform PC,Mac&Linux Standlone. The code work fine when test in unity, but the function from the namespace UnityEditor doesn't after build the project.
    The below is the code file:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4.  
    5. #if UNITY_EDITOR
    6. using UnityEditor;
    7. #endif
    8. #if UNITY_EDITOR
    9. public class changeTexture2D :ScriptableObject{
    10.      
    11.     // Use this for initialization
    12.     void Start () {
    13.    
    14.     }  
    15.     // Update is called once per frame
    16.     void Update () {
    17.        
    18.     }
    19.     public  void ChangeText()
    20.     {
    21.         string path = "Assets/D_FABRIC_02NOR_P0.png";
    22.         TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;
    23.         textureImporter.textureType = TextureImporterType.Image;
    24.         textureImporter.filterMode = FilterMode.Trilinear;
    25.         AssetDatabase.ImportAsset(path);
    26.         AssetDatabase.SaveAssets();
    27.         AssetDatabase.Refresh();    
    28.     }
    29.  
    30.  
    31.     public void ChangeNorthText()
    32.     {
    33.  
    34.         string path = "Assets/D_FABRIC_02NOR_P0.png";
    35.         TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;
    36.         textureImporter.textureType = TextureImporterType.Bump;
    37.         textureImporter.filterMode = FilterMode.Trilinear;
    38.         textureImporter.convertToNormalmap = true;
    39.         AssetDatabase.ImportAsset(path);
    40.         AssetDatabase.SaveAssets();
    41.         AssetDatabase.Refresh();
    42.     }
    43. }
    44. #endif
     
  10. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,021
  11. samlabs-tech

    samlabs-tech

    Joined:
    Oct 5, 2016
    Posts:
    4
    Hi, is there a solution yet for separating prod data and test data without creating 2 projects? If not could you please go into details on how to go about using 2 projects to achieve this?

    Thanks
     
    metanautvr likes this.
  12. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,021
  13. mattsbm

    mattsbm

    Joined:
    Jun 26, 2017
    Posts:
    2
    Would be great to have the ability to remove certain IDs from reporting.
     
  14. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,202
    @mattsbm Might you be able to elaborate as to which IDs you are referring to?
     
  15. mattsbm

    mattsbm

    Joined:
    Jun 26, 2017
    Posts:
    2
    Thanks for the reply Jeff -- these would be the IDs of devices that we were using internally to test on prod. Basically, a feature where we could "black list" IDs from our reports.
     
  16. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,202
    How are you generating the IDs, and how are you sending the ID to our system?