I’ve just updated to 1.6.0 and got the following error:
MissingReferenceException: The object of type 'ProfilerCameraListener' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
SRDebugger.Profiler.ProfilerServiceImpl.GetExpectedCameraCount ()
SRDebugger.Profiler.ProfilerServiceImpl.CameraDurationCallback (SRDebugger.Profiler.ProfilerCameraListener listener, Double duration)
SRDebugger.Profiler.ProfilerCameraListener.OnPostRender ()
As I understand from the discussion - this may be related to one of my plugins. How can I remove/suppress this error?
Does this error occur multiple times or just once? It might be that you or a plugin is removing a camera object during the frame and SRDebugger doesn’t pick up on the camera being removed until the next frame.
For a fix, replace the contents of StompyRobot\SRDebugger\Scripts\Profiler\ProfilerServiceImpl.cs with this file: https://hastebin.com/isusozuyez.cs
Hello, first of all thanks for this great addon, I’m enjoying it a lot.
I am however experiencing some issues using the bug reporting feature. At the end of the reporting process I’m always getting this error message on the console:
I’ve just tested the bug reporter on a linux VM (both the editor and the standalone player) and haven’t been able to reproduce the problem you’re seeing. I’ve made some changes on the server that may fix the problem, or at least give me a better idea what might be causing it. Can you try submitting a report again and let me know when you’ve done that?
Just purchased SRDebugger because it says it supports Playmaker, but the only actions it has seem to be for tweaking the options of SRDebugger. Is it possible to just print messages from playmaker to the console?? That is why I bought this package. They do not show up in the console at all, though.
SRDebugger will capture any messages that are sent to the Unity console. So you can use the built in playmaker logging actions (documentation here) and they will appear in the SRDebugger console. Make sure “Send to Unity Log” is enabled.
I am having a crash that I had to fix on my own , although surely not in the right way.
I create the gameobject manually, using SRDebug.Init. I assume that the object doesn’t destroy on level transition (and it seems to work), however in some circumstances (not all the level transitions reproduce it), I get the error:
private void CameraDurationCallback(ProfilerCameraListener listener, double duration)
{
/// Time to first camera
if (_reportedCameras == 0) {
_updateToRenderDuration = _stopwatch.Elapsed.TotalSeconds - duration - _updateDuration;
}/
Hi Simie, thank you for having a look. The changes you have made have indeed made a difference in that the exception now happens right when I click the submit button and not at the end “of the progress bar”. However, I’ve tested on Win and Mac and it works fine there, so this issue is not a big deal for me. I am running Arch linux which is only relevant for a tiny fraction of players anyways so I’m fine with you not digging further into this. Cheers!
Hi,
I moved from Unity 5.4 to 5.5.2p1 and I updated SRDebugger to 1.6.0 but I have an issue with the SROption window that is not showing anymore my settings.
Here is the log:
Service IOptionsService not found. (HasQuit: False)
UnityEngine.Debug:LogWarning(Object)
SRF.Service.SRServiceManager:GetService() (at Assets/Plugins/StompyRobot/SRF/Scripts/Service/SRServiceManager.cs:41)
SRDebugger.Internal.Service:get_Options() (at Assets/StompyRobot/SRDebugger/Scripts/Internal/Service.cs:100)
SRDebugger.Editor.SROptionsWindow:Populate() (at Assets/StompyRobot/SRDebugger/Scripts/Editor/SROptionsWindow.cs:92)
SRDebugger.Editor.SROptionsWindow:OnInspectorUpdate() (at Assets/StompyRobot/SRDebugger/Scripts/Editor/SROptionsWindow.cs:48)
UnityEditor.HostView:OnInspectorUpdate()
and then:
NullReferenceException: Object reference not set to an instance of an object
SRDebugger.Editor.SROptionsWindow.Populate () (at Assets/StompyRobot/SRDebugger/Scripts/Editor/SROptionsWindow.cs:92)
SRDebugger.Editor.SROptionsWindow.OnInspectorUpdate () (at Assets/StompyRobot/SRDebugger/Scripts/Editor/SROptionsWindow.cs:48)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:249)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:242)
UnityEditor.HostView.OnInspectorUpdate () (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:145)
I gave a look to the source and I can’t find any place where you register the IOptionsService service.
Unfortunately Unity doesn’t provide an API for writing/setting the clipboard that works on mobile platforms, so this isn’t likely to be implemented in SRDebugger right now.
Hi, I wrote a 5-start review for your asset about a month ago, with a few questions and requests. Would you mind commenting on these?
The debugging text size is way too small, almost unuseable. I haven’t found an easy way to increase it on device or in the editor. LogViewer was actually much better in this regard, allowing one to scale the whole UI content easily. Would you consider adding some setup options to make it readable - also on phones etc?
Bug report works great, but the text size again and the looks of it dont fit my game. I understand I should be able to customize it, but whats the correct way to do that? I already got a delegate function for handling post-bugreport, and a custom description, but I need to change all text, colors etc. Some documentation would be nice.
I want the bug reporter to be enabled for all users on all builds, but the 3-tap trigger to be only active on debug/development builds. I managed to do that by disabling everything initially and enabling stuff in custom code, but it would have saved some time to have a simple UI option to only enable the trigger for development builds.
Sorry, I didn’t notice the review. Thanks for leaving the 5*. The best way to contact me is here or via email as I get an email notification.
I’ve added an item to the roadmap for alternate UI scales. Right now SRDebugger automatically scales to 2* when it detects a retina style display (high dpi on mobile etc), but I’ll add a slider for a custom scale too.
As a temporary workaround, edit the prefab @ StompyRobot/SRDebugger/Resources/SRDebugger/UI/Prefabs/DebugPanel.prefab. You should be able to adjust the canvas scaler without adding it to the scene first, since it’s a first-level child of the prefab (SR_Canvas).
Customising the bug report sheet will require modifying the prefab located @ StompyRobot/SRDebugger/Resources/SRDebugger/UI/Prefabs/BugReportSheet.prefab. These steps should get it to a state that can be modified:
Create an empty canvas
Add a “Style Root” component and assign the “Default” style to it. (StompyRobot/SRDebugger/UI/Styles/Default)
Add the BugReportSheet prefab as a child. Set it to a sensible height/width (it will be automatically set to stretch to fill when used by SRDebugger)
Then you can edit and save as normal and it should work.
I’ll add an option to only enable the trigger on development builds.
Thanks for the feedback and sorry again for not noticing your review.
I may have missed something crucial, but I believe there should be an easier and cleaner approach to scaling the UI for any screen.
Disable “SR Retina Scaler”-component
Set the UGUI “Canvas scaler” to “Scale with screen size”, and then for example “Match width or height” to 0 or 1.
Use the UGUI rect Transforms normally, keeping scales mostly at 1, and the various “Layout element” scripts / wrappers width height/width whatever works. I decreased the input text box height to fit it better.
Set UGUI Texts to “Best Fit”, or whatever works best (I love TextMeshPro over UGUI Text, but I was too lazy to replace the elements, luckily that will be in core soon).
I did this and it worked fine, the prefabs fit and scale just perfectly on portrait and landscape (tested: 16:9 / 9:16, 3/4, 4/3).
Thanks about the location. The problem is of course that I don’t want these prefabs accidentally overridden if I update the asset. Since Unity updates tracks the internal ID:s, but your code looks for the filepath, I did this instead:
Copied
/StompyRobot/SRDebugger/Resources/SRDebugger/UI/Prefabs/* to /MyGame/SRDebugger/Resources/SRDebugger/UI/Prefabs/
Then renamed the BugReportSheet.prefab and BugReportPopover.prefab in the original folder to BugReportPopover_ORIG.prefab etc. They can then be safely overridden by Unity during assett updates.
Customized prefabs in /MyGame/SRDebugger/Resources/SRDebugger/UI/Prefabs/* . These will now be automatically used because the old filepaths dont match anymore.
So, this worked for me
Thanks. Maybe I will start using it with the next update then instead of my custom solution.
This would work, however one of the key aims I had when setting up the responsive layout was to actually take advantage of extra screen space by showing more information, rather than just scaling things up. A more appropriate setting would be “Constant Physical Size”. It was quite some time ago that I set all this up, but I recall the implementation of that feature in Unity 4.7 or early versions Unity 5 was buggy and unreliable, hence the need for SR Retina Scaler. I’ll have to investigate again and see if the situation has improved in later versions, and either drop support for Unity 4 and earlier versions of Unity 5 or do some scripting to enable the setting on appropriate versions.