Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Web player support

Discussion in 'Unity Analytics' started by Ehnn, Jan 17, 2015.

  1. Ehnn

    Ehnn

    Joined:
    Aug 27, 2012
    Posts:
    58
    Does unity analytics work with web player?

    It seems to not be working for me, starting with step 5 of the integration not getting the data across, and then even if a different platform is used to set it up the data gathering doesn't seem to work

    just looking for an official "no, not supported" so I stop trying to fiddle with it on web
     
  2. mbirk

    mbirk

    Unity Technologies

    Joined:
    Apr 25, 2014
    Posts:
    18
    Sorry, the only supported platforms during our Beta period are iOS and Android. We do plan to expand to other platforms in the future, but we do not yet have a specific timeline.
     
    toddh likes this.
  3. Ehnn

    Ehnn

    Joined:
    Aug 27, 2012
    Posts:
    58
    thanks!
     
  4. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    323
    If you're looking to start getting analytics on the webplayer you can sign up for Heap analytics for free (awesome in its own right) and use its custom API to track necessary events within the webplayer.
     
  5. markychoi

    markychoi

    Moderator

    Joined:
    Aug 4, 2014
    Posts:
    40
    I have an update to @mbirk 's comment. We're currently working on extending support to additional platforms, one of which is the webplayer. Given our current timeline, the delivery date is expected to be around GDC.
     
  6. johnsteinberg

    johnsteinberg

    Joined:
    Jan 12, 2015
    Posts:
    26
    +1 Vote for web player. This would be a nice alternative to something like Parse and stay in the Unity Toolset family.
     
  7. ViNull

    ViNull

    Joined:
    Apr 14, 2013
    Posts:
    6
    Hmm... suppose I should have read up on this before I put it in a web game :/ It worked in the the editor for the test, so I just assumed it would work in the web player.

    As a side note, I started adding it to a second project but got an AnalyticsResult from StartSDK as UnsupportedPlatform. This is in the editor. My guess is something is messed up with the project since I've opened this game in the Unity for PSM - the reason I came to the forums is to see if anyone had this experience, but since there isn't any web support I guess I'll put this on hold a bit.

    Also means I'll need to find a new topic for the game user group meeting in Feb >.<

    Update: I deleted the Library and obj folders and the error went away
     
  8. kentunity

    kentunity

    Unity Technologies

    Joined:
    Sep 16, 2014
    Posts:
    55
    Hi ViNull,

    Currently our SDK on the Editor only supports iOS-Editor, Android-Editor, StandAlone-Editor.
    So getting the "UnsupportedPlatform" is normal if the platform is for Playstation.

    You can see the supported platforms in UnityAnalytics.cs line 1.
    This will change overtime as we support more platforms.
     
  9. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,571
    And another +1 bump for webplayer support. I'm rather stoked that Unity is making first party analytics API because I'm tired of chasing around between them all. Bravo... go Unity!
     
  10. ViNull

    ViNull

    Joined:
    Apr 14, 2013
    Posts:
    6
    Just following up - this was for all platforms Editor (Unity standard). The project had been opened and saved in Unity PSM, but the error was from Unity standard. It seems the PSM version left something in the Library folder that caused Analytics to not detect the correct version of the Editor. The error was also thrown in the editor during debug, not in a build. Once I deleted the Library file, the error stopped.
     
  11. kentunity

    kentunity

    Unity Technologies

    Joined:
    Sep 16, 2014
    Posts:
    55
    Thanks for sharing your solution, just need to better understand your situation.

    When you say "all platforms Editor(Unity standard)", do you mean the "PC,Mac & Linux Standalone" platform?
    What platform is selected in your Build Settings when this Unsupported Platform occurs?
    "The error was also thrown in the editor during debug, not in a build" - which platform was selected in the Build Settings for the debug and actual build?

    Could you also share which specific Library and obj folder you deleted for this fix?
     
  12. ViNull

    ViNull

    Joined:
    Apr 14, 2013
    Posts:
    6
    Hi Kentunity - I'll try to answer as best I can!

    Not platform, version of Unity - i.e. what you get why you download Unity off of the download link. I have two versions of Unity installed, the one I called "Standard" and Unity for PSM. The project had been opened in Unity for PSM, but the error happened in Unity Standard.

    Build Settings - I tried several, going from the PC, Mac, & Linux standalone to Web Player by clicking "Switch platform" = Note I wasn't trying to click "Build" here.

    By debug I mean by click "play" in the editor and testing the game in the Unity editor.

    I delete the entire folders Library and obj (with Unity closed) for the project.

    Again, my hunch was Unity for PSM left something in the Library settings that didn't get removed by Standard and the Analytics script though it was still in Vita mode...
     
  13. kentunity

    kentunity

    Unity Technologies

    Joined:
    Sep 16, 2014
    Posts:
    55
    If you look at the our SDK's UnityAnalytics.cs, we use compile time defines (like the code below) to determine if the current platform is supported.
    You could verify if the PSM's lib folder is messing up in determining the current platform by calling the following method:


    Code (CSharp):
    1.  
    2. void VerifyPlatform(){
    3.      #if UNITY_IPHONE
    4.      Debug.Log("iphone platform");
    5.      #elif UNITY_ANDROID
    6.      Debug.Log("android platform");
    7.      #elif UNITY_STANDALONE
    8.      Debug.Log("standalone platform");
    9.      #elif UNITY_WEBPLAYER
    10.      Debug.Log("web player platform");
    11.      #else
    12.      Debug.Log("Other platform");
    13.      #endif
    14. }