aliessmael / unity-logs-viewer Goto Github PK
View Code? Open in Web Editor NEWUsing this tool you can easily check your editor console logs inside the game itself! No need to go back to the project and do any tests to track the problems!
Using this tool you can easily check your editor console logs inside the game itself! No need to go back to the project and do any tests to track the problems!
There is an rare-observed issue as NGUI and Log Viewer co-existing in Unity 2018 on mobile platforms. Because rare articles encountered and talked about this, I think it is worthy to mention, in case others face the same problem.
As coexisting with NGUI, Log Viewer in Unity 2017 works fine on my project but when I tried to upgraded to Unity 2018 Log Viewer mal-functioned only in tapping buttons and tapping log items on mobile platforms (iOS and android).
Disable auto hide cursor of NGUI UICamera at first scene solved the problem.
I noticed when my unity program uses debug.log, say at Run of my program because it's checking for needed files, and it logs a bunch of missing files at run - the Logs Viewer comes up on it's own.
I don't want to hassle my users with this, why is it doing this?
Has:
Assets\Unity-Logs-Viewer\Reporter\Reporter.cs(31,14): error CS0101: The namespace '' already contains a definition for 'Images'
been dealt with?
There is no menu>report like
create reporter from menu (Reporter->Create) at first scene your game start.
Probably because of compile errors due to namespace.
I'm not sure if this post would even be read. I sent an e-mail to the unity technologies team. See the e-mail below:
Your link in https://assetstore.unity.com/packages/tools/integration/log-viewer-12047 doesn't create a reporter object in my unity from the second time onwards. Check the screenshots i sent. As I said, it DID work the first time. Please reply this post if you don't understand anything.
Hi!
I'm not able to show this in a vertical screen in a way that it shows it all. Most of the buttons get hidden and I can't slide them or something.
Thanks.
The log viewer worked nice on windows phone 8.1, but i've had issues when building for windows phone 10:
The type or namespace name 'ThreadStart' could not be found
'Thread' does not contain a definition for 'Start' and no extension method 'Start' accepting a first argument of type 'Thread' could be found
'Thread' does not contain a definition for 'Abort' and no extension method 'Abort' accepting a first argument of type 'Thread' could be found
It's all in TestReporter.cs.
Thanks for this great job by the way
Thank you for great asset!
it's easy to see app logs on devices.
I want to include this asset to my own private repo, and show this asset's information in it.
what is the type of license for this asset?
"All what you have to do is to make a circle gesture using your mouse (click and drag) or your finger (touch and drag) on the mobile screen to show all these logs! " Is there a video to show this? I've been making circles using left right and middle click and nothing is happening...
I can't press the close button when the status bar is displayed on iPhone 11 Pro.
Can you support the Safe Area?
If you have a joystick in your project, or another object that requires you to circle around with the mouse/'finger, the reporter will be opened when you are testing. There is no other way to open the reporter other than the circle gesture.
(Maybe add button functionality or something alike)
I have imported the file into my project but the calls using the 'Input' namespace isn't supported with the Unity input system. I have implemented my own fixes to the code for my personal use fine but as I am just using PC this won't work for touch-based systems and my modified version won't detect if the game is using the input system. Despite this here are the steps I took to fix it for you to get started with:
All work is done in the Reporter.cs file.
Added 'using UnityEngine.InputSystem;' to the start of the file.
Modified the isGestureDone(), isDoubleClickDone(), getDownPos(), and getDrag() functions:
- Swapped, Input.GetMouseButtonDown/Up(0) with Mouse.current.leftButton.wasPressed/RelesedThisFrame
- Swapped, Input.GetMouseButton(0) with Mouse.current.leftButton.isPressed
- Swapped, all mose position calls with Mouse.current.position.ReadValue() (using .x and .y for float outputs)
- Deleted all the if IOS or Android platform calls in these functions to remove the conflicting function calls.
Let me know if you want to see the code.
Many thanks for this wonderful tool. Although I've been using using it for year without a problem, on import into the latest Unity build I get the following error:
Assets/Unity-Logs-Viewer/Reporter/Reporter.cs(2013,47): error CS0619:
UnityEngine.RuntimePlatform.OSXWebPlayer' is obsolete: WebPlayer export is no longer supported in Unity 5.4+.'
Commenting out the offending code get me past the error, but when I open the log window I get a 'cannot connect to destination host' error. Any ideas?
After you open it, how do you close it? The circle gesture again? I can't get anything to work.
ReporterModificationProcessor always writes to file in Asset folder every time I hit the play button - unity import popup shows. It really annoying - I deleted this class.
But I'm sure there is another way)
I found it does work on my realme 6. However, the fonts are too small to be seen. I didn't even notice it until much later. I also notice that I no longer need to activate developer option on my phone.
Getting this error during runtime in the Editor:
NullReferenceException: Object reference not set to an instance of an object
Reporter.Update () (at Assets/Unity-Logs-Viewer/Reporter/Reporter.cs:1844)
After pressing 'play' in the Editor, Unity freezes
iOS build or anddroid IL2CPP build not show stack
"After Unity 5.6, we will introduce a new version numbering system starting with the 2017.x cycle for all releases in 2017. We’ve made this change to clearly mark the end of the Unity 5 cycle, and align with our release cadence."
new directives:
UNITY_5_3_OR_NEWER
UNITY_5_4_OR_NEWER
UNITY_5_5_OR_NEWER
UNITY_5_6_OR_NEWER
UNITY_2017
UNITY_2017_1
UNITY_2017_1_0
UNITY_2017_1_OR_NEWER
Would be nice to have an icon for the copy to clipboard button, it's hard to find now.
Hi, I realize if the warnings are all fixed and ready to release version 1.7, could you update the Log Viewer in Unity Asset Store? I tried to download the Log Viewer package yesterday but it seems like is still on version 1.6. Thank you!
I'm getting warnings that Reporter is using the deprecated OnLevelWasLoaded, which will make this incompatible with future Unity versions.
What is the main purpose of the "ReporterGUI.cs"? Currently it's a dummy script, which just calls reporter.OnGUIDraw() and nothing more. Do you plan refactoring? (maybe move all GUI-related stuff from "Reporter.cs" to this "ReporterGUI.cs")
Because without refactoring it makes no sense to keep this dummy script. It brings only "add/destroy component" extra effort to show/hide the Reporter. Please explain, why one needs to do so? Currently it is easier to just use OnGUI() inside "Reporter.cs", or are there some special cases?
p.s. I've decided to add "disable Reporter in Editor" bool variable, and then faced this interesting show/hide logic via "ReporterGUI.cs", so the question appeared.
Hi
I am new to Unity (using Version 2017.3) and cannot figure out how to install the Unity-Logs-Viewer into my project.
I have downloaded it from the Unity Asset Store and imported it into my project. If I read your documentation correctly, there should now be a menu called "Reporter" from which I could select "Create". However, I do not have such a menu.
Could you please explain in a more detailed way how to install the plugin?
Thank you so much, I look forward to using your tool!
like your example:
in pc, display print LogError:
Test LogError 97
UnityEngine.Debug:LogError(Object)
TestReporter:Update() (at Assets/Reporter/Test/TestReporter.cs:84)
but in android, display print LogError:
Test LogError 97
In android, can display the file name and line number like pc?
The end, however, thanks for your this code!
The asset is not showing line number, only the function. Instead of the line number I can see (at<00000000000000000000000000>0)
please replace this
List samples = new List(60 * 60 * 60);
to
List samples = new List();
60 * 60 * 60 = 216000 or 1.6 mg waste ram ...
It would be very nice to be able to copy the log messages & stack traces to the clipboard.
The base class of ReporterEditor
is named Editor
. However, this clashes with namespace Editor
used for Editor folders in Unity.
I suggest moving plugin files to their own namespace:
namespace Unity_Logs_Viewer.Reporter.Editor
{
public class ReporterEditor : UnityEditor.Editor
{
...
}
}
Log viewer automatically starts always and I can't find how to turn this off.
Hello, may I use your things?
Please update the package on the Asset Store. I think the current one doesn't contain the fix for the new Scene Management.
If the Reporter folder is not located directly in Assets, image paths such as "Assets/Reporter/Images/clear.png" refered in ReporterEditor.cs are not correct, hence the Reporter object created via the Reporter > Create menu is not initialized correctly: all image bindings are empty.
I am trying to get the path of the ReporterEditor.cs script to deduce the path but it's hard to do that in a *static * method. Otherwise I'd do something like
// MonoScript scriptAsset = MonoScript.FromScriptableObject(this);
// string reporterPath = Path.GetDirectoryName(AssetDatabase.GetAssetPath(scriptAsset));
assuming MyAssetModificationProcessor
is turned into an EditorWindow
(which is a ScriptableObject) instead of an AssetModificationProcessor
.
For now I am changing the path manually with:
string reporterPath = "Assets/Unity-Logs-Viewer/Reporter";
reporter.images.clearImage = (Texture2D)AssetDatabase.LoadAssetAtPath(Path.Combine(reporterPath, "Images/clear.png"), typeof(Texture2D));
...
Since Reporter is not the root of the repository anymore, we have to expect users to clone the repository inside some Assets sub-folder, probably named "Reporter" (but a parent) or "Unity-Logs-Viewer" since it is the name of the repository.
By the way, there are no images for showGraphImage and cameraImage for the said script, although I guess the images are not used much. Maybe we should open a new issue for that.
in Reporter.cs at 311 line:
sample.loadedScene = (byte)SceneManager.GetActiveScene().buildIndex;
If scene loaded from AssetBundle, buildIndex is equal -1
, but (byte)-1
is equal 255.
Then at 92 line:
if ((int)loadedScene == -1)
return "AssetBundleScene";
the condition is not met and every frame in console write critical error.
NullReferenceException: Object reference not set to an instance of an object
Reporter.Update () (at Assets/Unity-Logs-Viewer/Reporter/Reporter.cs:1789)
Line at fault:
int sceneIndex = SceneManager.GetActiveScene().buildIndex ;
The first time it ran and I must say it is a great tool to have!
Reporter will generate errors when loading scenes from Asset Bundles because they have a level index of -1 which causes an IndexOutOfRangeException when trying to access the scenes array.
if( string.IsNullOrEmpty( scenes[ Application.loadedLevel ] ))
scenes[ Application.loadedLevel ] = Application.loadedLevelName ;
Error: IndexOutOfRangeException: Array index is out of range.
Reporter.Update () (at Assets/Reporter/Reporter.cs:1817)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.