Comments (4)
A few things you could consider:
- Documenting this limitation, e.g.
Simply add IngameDebugConsole.ConsoleMethod attribute to your functions. These functions must be public, static and must reside in a public class in the Assembly-CSharp.dll assembly (i.e. if your code is in custom assemblies, as will happen if you use asmdefs, the attributes will not be detected).
- The amount of time it will take to iterate all types in the Assembly.CSharp.dll is already not under your control. It could still be slow if there is a lot of code.
- It takes ~130ms for me with no optimization, for me this is no problem for debug initialization code to take this long when it runs only once, however I have no doubt it could be optimized by a factor of 10 or more by e.g. excluding a bunch of known modules.
from unityingamedebugconsole.
Yes I'm aware of this limitation. That's why I like the DebugLogConsole.AddCommand functions. I'm inspecting only Assembly-CSharp purely for performance reasons. I fear including all assemblies in the search would take significantly more time and it would be unpreferable for users who aren't interested in custom commands.
from unityingamedebugconsole.
I tried to optimize the assembly list and could only get it down to ~25ms by excluding modules based on name prefix (which isn't bullet proof), and company attribute value. This still left 14 out of 120 assemblies, all my plugins and game code.
Its a shame that module attributes are so inconsistently applied. e.g. having one generated automatically for each asmdef module would help in this case, but there isn't any such thing.
from unityingamedebugconsole.
I've omitted most of the built-in assemblies from the search. Hopefully it will be pretty fast.
from unityingamedebugconsole.
Related Issues (20)
- [Feature request] Add command history navigation buttons for mobile devices HOT 7
- when i matter UnityIngameDebugConsole to the BoatAttack project, I get this error. HOT 2
- Nintendo Switch and BoatAttack - The interface freezes and I can't interact HOT 2
- Build error due to DebugLogManager
- [Feature request] Collect logs when disabled HOT 1
- [Feature request] Supports safe area. HOT 4
- [Suggestion] add version info to Readme HOT 1
- Android Log is not work HOT 1
- Cannot build on Android HOT 1
- Are there any files stored all logs? HOT 2
- 19 Warnings when entering playmode on unity 2022 HOT 7
- Make copy to clipboard a separate package HOT 2
- UIToolkit HOT 2
- When saving a Unity project, it randomly tries to save the IngameDeugConsole.prefab HOT 1
- Can log entries always be expanded? HOT 1
- Disable unity input manager HOT 1
- Unconstrained memory usage due to log entries HOT 3
- README.md does not match README.txt HOT 2
- [Feature request]Automatic Locate HOT 2
- After running, output a NullReferenceException every second.Until focus game panel. HOT 12
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 unityingamedebugconsole.