Search Unity

  1. Unity 2018.3 is now released.
    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. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Event setup for equipment and skills the player use in the pvp battle

Discussion in 'Unity Analytics' started by LeGiangAnh, Sep 22, 2018.

  1. LeGiangAnh

    LeGiangAnh

    Joined:
    Nov 10, 2013
    Posts:
    96
    I would like to track the equipment and skills the player use in the pvp battle.
    However, we have many equipment and abilities per player. So I guess the event will look like this:

    Event name: match_end
    Parameters: game_mode, ability1, ability2, ability3, ability4, equipment1, equipment2, equipment3, equipment4, equipment5, equipment6, match_result, match_duration, gold_earn, character_use, score_earn

    Is this a correct approach? Does Unity Analytics support array data type in parameters?
    If the player has many types of equipment (up to 10) and ability (up to 8 ), we may reach the limit of 10 parameters per event.

    Or should I use the follow approach:

    Event name: match_end
    Parameters: game_mode, match result, match_duration, score_earn, gold_earn

    Event name: ability_use_in_pvp_match
    Parameters: game_mode, ability1, ability2, ability 3, etc.

    Event name: equipment_use_in_pvp_match
    Parameters: game_mode, equipment1, equipment2, etc.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,804
    To reduce the parameter count, you could always use a bitmask if the datatype fits. You could also put several variables into a JSON string, or simply separate values with commas, etc. Unless you are using Raw Data Export, you would not be able to link together the last 3 event types, so you are aware. The Dashboard only provides an aggregated view of the data. I'm not sure if we support a dictionary as a parameter type inside the parameter dictionary, but would be easy to test
     
    LeGiangAnh likes this.
  3. LeGiangAnh

    LeGiangAnh

    Joined:
    Nov 10, 2013
    Posts:
    96
    Hi @JeffDUnity3D . Thank you for your support. I'm quite new to Unity Analytics and those methods. Do we have any document in Unity sites? How, I can do the test as you said?
    Besides, I'm not familiar with working with the queries from Raw Data Export yet. So it could be better for a "Dashboard" solution at the moment. Then I will study working with Raw Data Export later on.
     
    Last edited: Sep 24, 2018
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,804
  5. LeGiangAnh

    LeGiangAnh

    Joined:
    Nov 10, 2013
    Posts:
    96
    Thanks. I'm a pro subscriber. My last question: Could you please provide a simple example of using JSON string to keep some variables, especially in my case?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,804
    It's just a string in JSON format (Google JSON if you need the exact syntax). Although in your case just using a comma separated list would accomplish the same thing instead of JSON if you are not familiar with it.
     
  7. LeGiangAnh

    LeGiangAnh

    Joined:
    Nov 10, 2013
    Posts:
    96
    Thank you. Then I will use queries to get whatever I want from the exported JSON data, not the dashboard?
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,804