• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by fmessaoudi · Jun 09, 2015 at 02:14 PM · profilerlog

read the binary log file

Hi there!

I'm trying to save the profiler inside a file, so I got a binary file, and when I tryed to read this file using Notpad++, VCS, Hexa Editor and also using script to convert to an ASCII encoding, i got this filewherein we can read some informations (red rectangles), but why we can not read the rest of the file (green rectangles) alt text.

here is the code used:

 using System;
 using System.IO;
 using System.Text;
 
 class Program
 {
     static void Main(string[] args)
     {
         // Read the file into <bits>
         var fs = new FileStream("mypath/mylog.log.data", FileMode.Open);
         var len = (int)fs.Length;
         var bits = new byte[len];
         fs.Read(bits, 0, len);
         // Dump 16 bytes per line
         for (int ix = 0; ix < len; ix += 16)
         {
             var cnt = Math.Min(16, len - ix);
             var line = new byte[cnt];
             Array.Copy(bits, ix, line, 0, cnt);
             // Write address + hex + ascii
             Console.Write("{0:X6}  ", ix);
             Console.Write(BitConverter.ToString(line));
             Console.Write("  ");
             // Convert non-ascii characters to .
             for (int jx = 0; jx < cnt; ++jx)
                 if (line[jx] < 0x20 || line[jx] > 0x7f) line[jx] = (byte)'.';
             Console.WriteLine(Encoding.ASCII.GetString(line));
         }
         Console.ReadLine();
     }
 }


Thank you inadvance!!!!

sans-titre.png (74.9 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by HarshadK · Jun 09, 2015 at 02:22 PM

You can not simply read the binary file as you would read a text file.

If you want to view your profiler log then you need to read the log files as specified here.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by fmessaoudi · Jun 09, 2015 at 03:15 PM

before every thing thank you for your answer; Actually, I alerady read all these text files: output_log.txt; mylog.txt (created by :

Profiler.logFile = "mylog.log"; Profiler.enableBinaryLog = true; Profiler.enabled = true; )

But I didn't found Interesting things inside:

for mylog.txt I got : -- Frame 181 Framerate: 53.9 [Very Good Framerate]

  -- Frame 182 Framerate: 50.5 [Very Good Framerate]
  -- Frame 183 Framerate: 55.2 [Very Good Framerate]
  -- Frame 184 Framerate: 50.1 [Very Good Framerate]
  -- Frame 185 Framerate: 51.1 [Very Good Framerate]
  -- Frame 186 Framerate: 48.9 [Very Good Framerate]
      ......


and for output_log.txt: something repeated every time :

 "SetDestination" can only be called on an active agent that has been placed on a NavMesh.
 UnityEngine.NavMeshAgent:INTERNAL_set_destination(Vector3&)
 UnityEngine.NavMeshAgent:set_destination(Vector3) (at C:\buildslave\unity\build\artifacts\generated\common\modules\NavMeshAgentBindings.gen.cs:47)
 DoneEnemyAI:Patrolling() (at C:\Users\Public\Documents\UnityProjects\NewUnityProject2\Assets\Done\DoneScripts\EnemyScripts\DoneEnemyAI.cs:123)
 DoneEnemyAI:Update() (at C:\Users\Public\Documents\UnityProjects\NewUnityProject2\Assets\Done\DoneScripts\EnemyScripts\DoneEnemyAI.cs:49)
 
 [C:/buildslave/unity/build/Runtime/AI/Internal/Components/NavMeshAgent.cpp line 149] 
 (Filename: C:/buildslave/unity/build/artifacts/generated/common/modules/NavMeshAgentBindings.gen.cs Line: 47)
 
 ArgumentOutOfRangeException: sourceIndex + count > Length
 
 Parameter name: sourceIndex
   at System.String.CopyTo (Int32 sourceIndex, System.Char[] destination, Int32 destinationIndex, Int32 count) [0x000d0] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:185 
 
   at DoneAlarmLight.Update () [0x00014] in C:\Users\Public\Documents\UnityProjects\NewUnityProject2\Assets\Done\DoneScripts\AlarmSystems\DoneAlarmLight.cs:56 
  
 (Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs Line: 185)
 
 Non-convex MeshCollider cannot be used as a trigger in Unity 5.
 If you want to use this mesh as a trigger you have to make the MeshCollider convex. Scene hierarchy path "prop_cctvCam_002/prop_cctvCam_joint/prop_cctvCam_body/cam_frustum_collision", Mesh asset path "" Mesh name "cam_frustum_collision"
  
 (Filename: C:/buildslave/unity/build/Runtime/Dynamics/Dynamics3/PhysicsManager.cpp Line: 1291)
 
 Non-convex MeshCollider cannot be used as a trigger in Unity 5.
 If you want to use this mesh as a trigger you have to make the MeshCollider convex. Scene hierarchy path "prop_cctvCam_003/prop_cctvCam_joint/prop_cctvCam_body/cam_frustum_collision", Mesh asset path "" Mesh name "cam_frustum_collision"
  
 (Filename: C:/buildslave/unity/build/Runtime/Dynamics/Dynamics3/PhysicsManager.cpp Line: 1291)
 
 "GetRemainingDistance" can only be called on an active agent that has been placed on a NavMesh.
 UnityEngine.NavMeshAgent:get_remainingDistance()
 DoneEnemyAI:Patrolling() (at C:\Users\Public\Documents\UnityProjects\NewUnityProject2\Assets\Done\DoneScripts\EnemyScripts\DoneEnemyAI.cs:100)
 DoneEnemyAI:Update() (at C:\Users\Public\Documents\UnityProjects\NewUnityProject2\Assets\Done\DoneScripts\EnemyScripts\DoneEnemyAI.cs:49)
 
 [C:/buildslave/unity/build/Runtime/AI/Internal/Components/NavMeshAgent.cpp line 548] 
 (Filename: C:/Users/Public/Documents/UnityProjects/NewUnityProject2/Assets/Done/DoneScripts/EnemyScripts/DoneEnemyAI.cs Line: 100)

So I don't see any profiler information here???? and how we can DISPLAY the recorded profiledata in the profiler only from mylog.txt using this instruction: Profiler.AddFramesFromFile("mylog.log");

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Reading the profiler log 0 Answers

Android Internal Profiler Interval 1 Answer

Why does Build Report Log miss 50% in filesize count? 1 Answer

Android profiler log file failure 1 Answer

What profiling options are available for web builds? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges