Comments (5)
Hi Michael,
thanks for the feedback! I think this should be quite easy to do, I'm thinking the Unity File Debug prefab will get a reference to a UI Text component. If set it will append the output. Is this something like you were thinking?
from unity-file-debug.
Sounds good, maybe use a scroll view text rather than just a text component for a better overview/scrolling with a lot of Debug output.
from unity-file-debug.
After investigating this I think its outside of the scope of this repository. It can be very quick that a Scroll Rect / UI Text component fills up with logs and will start to error out like so
ArgumentException: Mesh can not have more than 65000 vertices
UnityEngine.UI.VertexHelper.FillMesh
and
String too long for TextMeshGenerator. Cutting off characters.
UnityEngine.Canvas:SendWillRenderCanvases()
A proper solution I would expect needs something like occlusion culling. One of the goals of this repository is to be small, and easy to understand and hack yourself. I think adding something like this in is only going to complicate things for most users. I will paste the code I did in an experiment incase you want to do this yourself (it was using Text on a Scroll Rect)
// UnityFileDebug/Lib/Logger/Scripts/UnityFileDebug.cs
using UnityEngine.UI;
...
public Text uiTextOutput;
...
Application.logMessageReceived += HandleLog;
if (uiTextOutput != null)
{
uiTextOutput.text = "";
Application.logMessageReceived += OutputLogToText;
}
...
void OutputLogToText(string logString, string stackTrack, LogType type)
{
uiTextOutput.text += logString;
}
// UnityFileDebug/Lib/Logger/Editor/UnityFileDebugEditor.cs
...
SerializedProperty uiTextOutput;
GUIContent uiTextOutputContent;
...
uiTextOutputContent = new GUIContent
{
text = "UI Text Output",
tooltip = "Unity UI Text component"
};
...
uiTextOutput = serializedObject.FindProperty("uiTextOutput");
...
EditorGUILayout.PropertyField(uiTextOutput, uiTextOutputContent);
from unity-file-debug.
This may be relevant/help in displaying large amounts of logs https://bitbucket.org/Unity-Technologies/list-view-framework
from unity-file-debug.
also check out https://github.com/bbbscarter/UberLogger
from unity-file-debug.
Related Issues (10)
- Enable toggle of timestamps for logs
- Does not work from UPM package
- 'isDebugBuild' is missing from the Unity Asset Store version of this, pls fix
- Remove editor folder from asset store releases HOT 1
- Support CSV for export and html import HOT 1
- Make viewer easier to use standalone HOT 1
- Support color themes in viewer
- HMD Bug in Steam VR (Open VR) HOT 2
- ArgumentOutOfRangeException: Length cannot be less than zero. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity-file-debug.