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)
.
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!!!
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.
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");