SRDebugger is a tool to help you track down bugs while on the target device.
Access to the Unity Console in any build of your game allows you to diagnose problems without deploying a debug build tethered to the Unity Editor.
The options tab can help you tweak parameters and invoke methods, enabling fast iteration of gameplay features.
Designed from the ground up for performance, SRDebugger can be included in all builds of your product with minimal footprint.
SRDebugger is accessed via a hot-spot in the corner of the display. Simply triple tap to open.
Optionally, this hot-spot can be disabled and the debug panel opened from script.
SRDebug.Instance.ShowDebugPanel();
The options tab provides a simple interface for tweaking properties or invoking actions.
Any properties of supported types defined in the SROptions class this tab.
public partial class SROptions {
private float _myProperty = 0.5f; // Default Value
[Category("My Category"]
public float MyProperty {
get { return _myProperty; }
set { _myProperty = value; }
}
}
Any property or action from the options tab can be pinned, so it will appear even when the debug panel is closed. This is perfect for fine-tuning gameplay related parameters.
Any questions, please donāt hesitate to post below or shoot me an email at simon@stompyrobot.uk. Check out our website for more information about SRDebugger! Thank you for reading
To get around this problem I just deleted Assets/StompyRobot/SRF/Scripts/Helpers/RealTime.cs. But when I build (Or try to run in the Editor) tapping three times in the specified corner does not bring up the debugger. Also It is causing my project to crash on load so often that I have to delete the project, and reopen my old project and re-import SRDebugger from the Asset Store.
Hi @TokyoDan , thanks for purchasing. Iām sorry youāre having problems.
The next update will remove the RealTime class (itās part of SRF, my supporting library, and isnāt used by SRDebugger specifically, so can safely be removed as you have done).
Re. the debugger not showing, have you added the SRDebugger.Init prefab to the scene you are running? You can take a look at StompyRobot/SRDebugger/Scenes/Sample.unity to see a simple setup of how it should look.
The crashing bug is strange, Iāve never encountered the kind of editor crashes you seem to be getting. Do you have any error messages or a stack trace of a crash I could take a look at?
Forget the crashing. Although when I imported SRDebugger into my project I was using Unity 4.6.2. Later when I went to work on it again I was getting confused and loading my project (with SRDebugger) in an older version of Unity (4.5.5). I got 3 versions installed and sometimes I start up the wrong one. When I do this the project hangs on load (spinning BeachBall) and I have to Force Quit it. Sorry to alarm you.
My problem now is that it just doesnāt work when I add the SRDebugger.Init prefab to my scene. In the Editor it runs with no errors but it seems that it is not acknowledging my triple-tap to start up SRDebugger. Nothing happens. BUT If I load the sample scene that is included with SRDebugger it works fine and looks real nice.
Maybe not acknowledging my triple-tap is a conflictā¦
Although I use Unity 4.6.2 I am not yet using any of Unityās 2D stuff. As for UI I am using NGUI because my project is too far along to change to a different UI system right now. I started my project two years ago long before Unityās 2D GUI came out.
Another possible conflict may be because I am using FingerGestures http://fingergestures.fatalfrog.com OnTap() on my Default layer and that may be masking the tap from getting to SRDebugger:
Good to hear you resolved the crashing issue, that had me pretty concerned for a moment!
Does the debugger appear correctly if your scene camera has a culling mask that includes the built-in UI layer? Iāve got an idea to include an option in the SRDebugger Settings window to select the layer that SRDebugger will use for rendering and input, which could help in situations such as yours.
Regarding compatibility with NGUI and FingerGestures, the new Unity UI event system provides a IsPointerOverGameObject() function which you can use to check if the debugger panel is blocking a touch, before your NGUI or FG code responds to it.
For FingerGestures you can use the FingerGestures.GlobalTouchFilter delegate to filter out touches that are interacting with the Unity UI. In my own games I use this, feel free to use it in your project:
public class FingerGesturesUnityEventsFilter : MonoBehaviour
{
void Awake()
{
FingerGestures.GlobalTouchFilter = GlobalTouchFilter;
}
private bool GlobalTouchFilter(int fingerIndex, Vector2 position)
{
var isMouse = FingerGestures.Instance.InputProvider is FGMouseInputProvider;
if (isMouse) {
if (fingerIndex == 0)
fingerIndex = -1;
if (fingerIndex == 1)
fingerIndex = -2;
if (fingerIndex == 2)
fingerIndex = -3;
}
if (EventSystem.current.IsPointerOverGameObject(fingerIndex))
return false;
return true;
}
}
Hi @Dosetsu , SRDebugger should be fully namespaced. Are you talking about the Util class in SRDebugger/Scripts/Internal/Util.cs? That appears to be in the SRDebugger.Internal namespace.
Version 1.0.1 has just been submitted to the Asset Store for approval, with Unity 5.0 support and bug fixes.
1.0.1
----------
New:
- Unity 5.0 Support.
- Added option to Settings pane to require the entry code for every time the panel opens, instead of just the first time.
Fixed:
- Removed debug message when opening Options tab for first time.
- Fixed conflict with NGUI RealTime class.
- Fixed layout of pinned options when number of items exceeds screen width.
Thanks all for your purchases and messages so far. If you find it useful it would be great if you could leave a review on the Asset Store
The next update will include Windows Store support, and hopefully IL2CPP support for iOS (Iām waiting on a few bug fixes on Unityās side before this can be finished)
I included āUIā in my scene cameraās culling mask. And that doesnāt help.
And I donāt think my problem is the debugger panel blocking a touch, before my NGUI or FG code responds to it. Itās the other way around as the debugger panel never appears. I think maybe NGUI or FG are blocking touches from hitting that little square area in the corner that you tap on to bring up the debugger panel.
@TokyoDan , here is a list of things that might help us track down the issue:
If you disable the NGUI root GameObject does the corner-trigger work?
Can you try selecting the EventSystem gameobject that is created at runtime (example screenshot) and checking if itās responding to input correctly?
If you select SRDebugger/Trigger/Trigger(Clone) at runtime and set the GraphicRaycaster āBlockingObjectsā field to None does that help?
If none of these help, if you could package up a repro project that demonstrates the issue that would be the quickest way to solve this.
A bit more info. As far as Iām aware, NGUI and FG shouldnāt interfere with the Unity UI EventSystem directly. Itās possible that they might be blocking raycasts of some kind, but I was under the impression that the GraphicRaycaster component didnāt use the physics system for raycasting, so itās a bit odd that weāre seeing probems here.
EDIT:
Iāve just finished porting a project of mine that uses NGUI and FingerGestures extensively to use the latest version of SRDebugger, and it seems to work fine without any problems.
Could you also screenshot for me the camera you have in the scene that is having problems? (Specifically, I want to see the Culling Mask). I might have a few ideas for changes that might fix your problem, if none of this helps Iāll see about getting you a beta version of the next update with those changes in place.
My game starts with a 1st āDontDestroyOnLoadā scene (TOTinit) which just has some initialization scripts (no camera) and quickly loads a 2nd scene (TOTinit2) which has a Main Camera and also has some initialization scripts and animation. In this 2nd scene there is also a PLAY button that starts the game by loading the 3rd scene (Play).
I donāt have to go as far as loading the 3rd (Play) scene to experience my problem
Since my 1st scene does not have a camera I also tried putting the SRDebugger.Init prefab in my second scene so that I could add āUIā layer to my Main Cameraās culling mask.
NGUI is not used in these 1st two scenes. But I forgot to mention that PlayMaker is. Also FingerGestures is used. Anyway I disabled the PlayMaker root objects and that didnāt help.
I selected the EventSystem gameobject that is created at runtime. And at the bottom on the Inspector I could see it updating pointer position and mouse clicks.
I selected SRDebugger/Trigger/Trigger(Clone) at runtime and set the GraphicRaycaster āBlockingObjectsā field to None. That didnāt help either.
As far as packaging up a repro project that demonstrates the issue the only thing I could do is send you my whole project. I see no value in trying to pare it down to isolate the problem as Iād end up getting rid of so much of my game that Iād find that SRDebugger is incompatible in my game and will not suit the purpose for which I bought it tis time. (although I do plan to use it in future games or once we figure out why itās not working in my project)
Iād need an email address so I could sen you a Dropbox URL to the project.
Anyway Iām sure the problem is not due to any deficiency in SRDebugger. It is caused by the complexity and probably unorthodox way I use scenes in my project.
Iām starting to think that the size, placement (Y position), and rotation of the trigger for SRDbugger may be the problem. My game is a board game in 3D space. The board is orientated is such a way that X= width, Z=height, Y= the face on which pieces are placed. When you look at the board you are looking down, and if the pieces are forced off the board they fall (-Y). I think in normal 2D, X= width, and Y=height and there is no Z (except for depth and parallax scrolling effects)
To achieve certain effects I do animation of planes. For example I have a blank plane at startup which just fills the screen. Then another plane with 3D game objects (start button, settings button, title, etc) slides in from the -Y direction and āpokesā through the blank startup plane. (You can see this effect at http://www.azumachogames.com/the-octagon-theory/#Example )
I think the trigger is not is a position that is unobstructed, sized or facing properly.
In SRDebugger Settings when I set the corner for the trigger position. Of what object is that the corner of? What determines the actual size, rotation and x,y,z position of that trigger?
Maybe there should be more settings for that trigger to allow positioning in 3D space, in addition to its default 2D positioning.
@TokyoDan , if youāre fine with sending me the entire project that is having the problem, Iām fine with that. Iāve sent you an email with my Dropbox email address.
OK. Thanks. Iāll send it in a minute. To simply things all it does is start up with the 1st Scene (TOTinit) which has no camera and quickly loads the 2nd scene (TOTinit2) which does have a camera. I stop it there with a blank screen as it doesnāt load any other scenes or any game objects. SRDebugger.Init is in scene TOTinit2 because scene TOTinit has no camera. The Main camera culling mask is set to Default & UI. The Trigger position is set to bottom left.