Search Unity

SRDebugger - On-Device Console, Options Panel, and Bug Reporter.

Discussion in 'Assets and Asset Store' started by Simie, Feb 7, 2015.

  1. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    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.
     
  2. vizgl

    vizgl

    Joined:
    Nov 4, 2014
    Posts:
    61
    Great tool!
    Only one thing, add copy support to console
     
  3. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @mcmorry, sorry for the delay.

    I've tried to reproduce the error you're seeing but haven't had any success (Using 5.5.2p3).

    Are you using something like MAD Compile Time optimiser that might be moving things around, causing scripts to be compiled into different assemblies?

    Does the error occur every frame or does it stop after the first occurrence?
     
  4. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    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.
     
  5. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    When I was hitting play, the editor window of SROption was empty.
    I don't remember 100% if it was every frame, but I think yes.

    Anyway, I rolled back to 5.4 as 5.5 was crashing the game on iOS on the splash screen...

    In case I'll have this issue again I'll report it to you.
    Thank you anyway :)
     
  6. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    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.
     
  7. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @ilmario,

    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.
     
    ilmario likes this.
  8. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    @Simie thanks for the comments.

    I may have missed something crucial, but I believe there should be an easier and cleaner approach to scaling the UI for any screen.
    1. Disable "SR Retina Scaler"-component
    2. Set the UGUI "Canvas scaler" to "Scale with screen size", and then for example "Match width or height" to 0 or 1.
    3. 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.
    4. 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:
    1. Copied
    /StompyRobot/SRDebugger/Resources/SRDebugger/UI/Prefabs/* to /MyGame/SRDebugger/Resources/SRDebugger/UI/Prefabs/
    2. 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.
    3. 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.
     
  9. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    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.
     
  10. Igorexa

    Igorexa

    Joined:
    Sep 25, 2014
    Posts:
    23
    How i can make screenshot and send bug report without show bug report panel?

    Please give code sample.
     
  11. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    This isn't supported. It was decided it should be a user-driven process to submit a bug report to avoid any potential privacy/legal problems arising from sending device information and screenshots without user consent.

    EDIT: You can however show the bug report sheet and populate the description field with the API, as described here: https://stompyrobot.uk/tools/srdebugger/documentation/#examples
     
  12. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I have bought This SR Debugger because I want to be able to use the SR Options with a player car that have some different values as velocity, springs, dampers, RPM, etc.

    The problem is that I am very bad at scripting and know very little, and do not know how to really activate the SR Options to be used with my game on iPad testing, so I could modify the values of he car DIRECTLY on the iPad while testing wihout having to do it inside the Uniy Editor

    I have seen the manual, and have been trying to find something in this hread, but regrettably could not find somehing that I could understand and follow step by step

    Thanks very much for any help
     
  13. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @SpaceRay,

    The example listed here should be a good starting point for you: https://stompyrobot.uk/tools/srdebugger/documentation/#sroptionsexample

    Here is a more tailored example for your situation:

    In a file called SROptions.Vehicle.cs, you could have:

    Code (CSharp):
    1. using System.ComponentModel;
    2. public partial class SROptions {
    3.  
    4.     // Default Value for RPM
    5.     private float _rpm = 500f;
    6.    
    7.     [Category("Vehicle")]
    8.     [NumberRange(1f, 10000f)] // This is the range of values possible for the RPM property
    9.     public float RPM {
    10.         get { return _rpm; }
    11.         set { _rpm = value; }
    12.     }
    13.  
    14.     // Default Value for Spring
    15.     private float _spring = 0.2f;
    16.    
    17.     [Category("Vehicle")]
    18.     [NumberRange(0.1f, 1f)] // This is the range of values possible for the Spring property
    19.     public float Spring {
    20.         get { return _spring; }
    21.         set { _spring = value; }
    22.     }
    23.    
    24. }

    and in your vehicle scripting you can use these properties like this:

    Code (CSHARP):
    1. void FixedUpdate() {
    2.     var spring = SROptions.Current.Spring;
    3. }


    To access the options panel on the device you open the panel and visit the "Options" tab. You can use the "pin" button in the toolbar to pin options, which allows you to modify them without opening the panel each time.
     
  14. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello Simie, thanks very much for your very fast answer

    Yes, I have already seen this before and I am very sorry that I have not been able to understand the example shown because of my own bad and low knowledge of scripting, I admire all of you that are very easy for you experts


    Thanks for modifying and adapt the example for me, I think that I know what you mean now, and that I have to make an external script for SR debugger (SROptions.Vehicle.cs) and then call from the CarPhysic.cs to this external file

    So I then after building the SROptions.Vehicle.cs, I have to modify the original code for example this line

    Code (CSharp):
    1. public float Radius = 0.4f;   // I want to be able to change this value in SR Options
    and change it to

    Code (CSharp):
    1. public float Radius = SROptions.Current.Radius;   // I want to be able to change this value in SR Options
    And then do this same thing to all the possible values I want to be able to change?

    thanks very much for your help.

    Here below is the code of my car physic script (taken from Realistic Car Kit) I want to change and test

    Code (CSharp):
    1. // 17/03/2016
    2. // Enabled all wheel effect
    3.  
    4. using UnityEngine;
    5. using System.Collections;
    6. using System.Collections.Generic;
    7. using System;
    8. using System.Runtime.Remoting;
    9. using UnityEngine.Audio;
    10.  
    11. public class CarPhysic : MonoBehaviour {
    12.  
    13.     public bool physicActivated = false;
    14.  
    15.     #region Members
    16.  
    17.     private float restTime=0;
    18.  
    19.     #region Wheels Setting
    20.     public CarWheels carWheels;
    21.  
    22.  
    23.     [System.Serializable]
    24.     public class CarWheels
    25.     {
    26.         public ConnectWheel wheels;
    27.         public WheelSetting setting;
    28.     }
    29.  
    30.     [System.Serializable]
    31.     public class ConnectWheel
    32.     {
    33.         public bool frontWheelDrive = true;
    34.         public Transform frontRight;
    35.         public Transform frontLeft;
    36.      
    37.         public bool backWheelDrive = true;
    38.         public Transform backRight;
    39.         public Transform backLeft;
    40.     }
    41.  
    42.     [System.Serializable]
    43.     public class WheelSetting
    44.     {
    45.         public float Radius = 0.4f;   // I want to be able to change this value in SR Options
    46.         public float Weight = 1000.0f;   // I want to be able to change this value in SR Options
    47.         public float Distance = 0.2f;    // I want to be able to change this value in SR Options
    48.     }
    49.     #endregion
    50.  
    51.     #region Wheel reference
    52.     private WheelComponent[] wheels;
    53.  
    54.     private class WheelComponent
    55.     {
    56.      
    57.         public Transform wheel;
    58.         public WheelCollider collider;
    59.         public Vector3 startPos;
    60.         public float rotation = 0.0f;
    61.         public float rotation2 = 0.0f;
    62.         public float maxSteer;
    63.         public bool drive;
    64.         public float pos_y = 0.0f;
    65.     }
    66.  
    67.     #endregion
    68.  
    69.     public CarParticles carParticles;
    70.  
    71.     [System.Serializable]
    72.     public class CarParticles{
    73.         public GameObject brakeParticlePerfab;
    74.         //public ParticleSystem shiftParticle1, shiftParticle2;
    75.         private GameObject[] wheelParticle = new GameObject[4];
    76.     }
    77.  
    78.     #region Car Engine Setting
    79.     public CarSetting carSetting;
    80.  
    81.     [System.Serializable]
    82.     public class CarSetting
    83.     {
    84.      
    85.         public bool showNormalGizmos = false;
    86.         public Transform carSteer;
    87.         public HitGround[] hitGround;
    88.      
    89.         public List<Transform> cameraSwitchView;
    90.      
    91.         public float springs = 25000.0f;    // I want to be able to change this value in SR Options
    92.         public float dampers = 1500.0f;     // I want to be able to change this value in SR Options
    93.      
    94.         public float carPower = 120f;       // I want to be able to change this value in SR Options
    95.         public float shiftPower = 150f;     // I want to be able to change this value in SR Options
    96.         public float brakePower = 8000f;    // I want to be able to change this value in SR Options
    97.      
    98.         public Vector3 shiftCentre = new Vector3(0.0f, -0.8f, 0.0f);   // I want to be able to change this value in SR Options
    99.      
    100.         public float maxSteerAngle = 25.0f;   // I want to be able to change this value in SR Options
    101.      
    102.         public float shiftDownRPM = 1500.0f;     // I want to be able to change this value in SR Options
    103.         public float shiftUpRPM = 2500.0f;      // I want to be able to change this value in SR Options
    104.         public float idleRPM = 500.0f;             // I want to be able to change this value in SR Options
    105.      
    106.         public float stiffness = 2.0f;
    107.      
    108.         public bool automaticGear = true;
    109.      
    110.         public float[] gears = { -10f, 9f, 6f, 4.5f, 3f, 2.5f };
    111.      
    112.      
    113.         public float LimitBackwardSpeed = 60.0f;
    114.         public float LimitForwardSpeed = 220.0f;
    115.      
    116.     }
     
  15. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    You've got the general idea, however there is one complication. Your current example of

    Code (csharp):
    1.  
    2. public class SomeClass {
    3.     public float Radius = SROptions.Current.Radius;   // I want to be able to change this value in SR Options
    4. }
    Won't work as you're expecting. Since it is a field, and you are setting the value from the field initializer, it will only read the value of SROptions.Current.Radius when the object is first created. So changes from the options panel won't have any effect on this value after that point.

    Ideally you want to read the SROptions.Current.Radius property directly every time you use it, but since you're integrating with a 3rd party script this might not be possible.

    My suggestion is to create a script that copies the values from SROptions to the car settings object used by Realistic Car Script every Update(), something like this:

    Code (csharp):
    1. void Update() {
    2.     var carSettings = gameObject.GetComponent<Car>.settings; // I don't know the API for the car script you're using, so you'll need to find out how to access the settings object.
    3.  
    4.     carSettings.spring = SROptions.Current.Spring;
    5.     carSettings.radius = SROptions.Current.Radius;
    6.     // repeat for all properties you want to tweak at runtime
    7. }
    Keep in mind I don't know the API/class layout of the plugin you are using so the above won't work out the box, you'll need to handle getting the car component and settings object yourself.
     
  16. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Thanks for your answer,I will try as you suggested

    Thanks very much for your help and sorry for my very bad knowledge of scripting
     
    Last edited: Apr 11, 2017
  17. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58
    SRDebugger used to work great for me. But I recently updated to Unity 5.6 (and I'm using the latest version of SRDebugger, 1.6.0), and now if I open the debugger and immediately close it, the entire app crashes.

    Any suggestions?

    Code (CSharp):
    1. NullReferenceException: A null value was found where an object instance was required.
    2.   at SRDebugger.UI.Other.SRTabController.remove_ActiveTabChanged (System.Action`2 value) [0x00000] in <filename unknown>:0
    3.   at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <filename unknown>:0
    4.   at SRDebugger.UI.MobileMenuController.CreateCloseButton () [0x00000] in <filename unknown>:0
    5.   at SRDebugger.UI.MobileMenuController.OnEnable () [0x00000] in <filename unknown>:0
    6.   at SRF.UI.ResponsiveEnable.Refresh () [0x00000] in <filename unknown>:0
    7.   at SRF.UI.ResponsiveBase.Update () [0x00000] in <filename unknown>:0
    8. UnityEngine.GameObject:AddComponent()
    9. SRDebugger.UI.MobileMenuController:CreateCloseButton()
    10. SRDebugger.UI.MobileMenuController:OnEnable()
    11. SRF.UI.ResponsiveEnable:Refresh()
    12. SRF.UI.ResponsiveBase:Update()
    13. (Filename: currently not available on il2cpp Line: -1)
    14.  
    15. NullReferenceException: A null value was found where an object instance was required.
    16.   at SRDebugger.UI.Other.SRTabController.remove_ActiveTabChanged (System.Action`2 value) [0x00000] in <filename unknown>:0
    17.   at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <filename unknown>:0
    18.   at SRDebugger.UI.MobileMenuController.CreateCloseButton () [0x00000] in <filename unknown>:0
    19.   at SRDebugger.UI.MobileMenuController.OnEnable () [0x00000] in <filename unknown>:0
    20.   at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <filename unknown>:0
    21.   at SRDebugger.UI.MobileMenuController.CreateCloseButton () [0x00000] in <filename unknown>:0
    22.   at SRDebugger.UI.MobileMenuController.OnEnable () [0x00000] in <filename unknown>:0
    23.   at SRF.UI.ResponsiveEnable.Refresh () [0x00000] in <filename unknown>:0
    24.   at SRF.UI.ResponsiveBase.Update () [0x00000] in <filename unknown>:0
    25. UnityEngine.GameObject:AddComponent()
    26. SRDebugger.UI.MobileMenuController:CreateCloseButton()
    27. SRDebugger.UI.MobileMenuController:OnEnable()
    28. UnityEngine.GameObject:AddComponent()
    29. SRDebugger.UI.MobileMenuController:CreateCloseButton()
    30. SRDebugger.UI.MobileMenuController:OnEnable()
    31. SRF.UI.ResponsiveEnable:Refresh()
    32. SRF.UI.ResponsiveBase:Update()
     
  18. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @NateJC, I've replied to your email but will copy the response here for other users with the same problem.

    I suspect the error might be caused by this known issue in Unity 5.6:

    > UI: Adding UI elements via script causes OnDisable and OnEnable to be called on all scripts in the hierarchy if a RectTransform needs to be added. Workaround is to add a RectTransform component in the new GameObject call, for example: new GameObject("Canvas", typeof(RectTransform));. (882791)

    Until Unity have fixed this, try changing line 86 in StompyRobot\SRDebugger\Scripts\UI\MobileMenuController.cs from

    var go = Content.CreateChild("SR_CloseButtonCanvas");

    to

    var go = new GameObject("SR_CloseButtonCanvas", typeof(RectTransform));
    go.transform.SetParent(Content, false);


    and a few lines later change

    var cGo = rect.CreateChild("SR_CloseButton");
    var cRect = cGo.AddComponent<RectTransform>();

    to

    var cGo = new GameObject("SR_CloseButton", typeof(RectTransform));
    cGo.transform.SetParent(rect, false);
    var cRect = cGo.GetComponent<RectTransform>();
     
  19. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58
    I sent the e-mail, then decided others might have the same issue so thought it would have been better to post it here instead. Sorry about the double. But most importantly:

    THAT WORKED!

    Thank you for the prompt and excellent response. I am a very satisfied customer and it was easy to rate this 5 stars. Thank you!
     
  20. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @NateJC, I'm glad that worked. Thanks very much for the review!
     
  21. Mirgan

    Mirgan

    Joined:
    Feb 2, 2016
    Posts:
    25
    Hi, I have the same issue as @Cripple. After installation Anima2d the square turns white.
     
  22. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @Mirgan, can you try deleting the SRDebugger folder and re-importing the package from the asset store? I have seen this issue caused by Unity losing referencing between prefabs, and reimporting the package usually fixes it.
     
  23. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    A patch release, SRDebugger 1.6.1 has just been released on the asset store. This update has workarounds for the issues introduced by Unity in 5.6.0.

    1.6.1
    ----------

    New:
    - Added "Development Builds Only" option to trigger behaviour.

    Fixed:
    - Crash caused by a known issue in Unity 5.6.0f3.
    - Compile warnings in Unity 5.6.0f3.
     
  24. Mirgan

    Mirgan

    Joined:
    Feb 2, 2016
    Posts:
    25
  25. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
  26. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    I got the white square issue today after updating to the latest release of SRDebugger (Windows 10 and Unity 5.6.0f3).

    Reapplying the API key and disabling Trigger Mode (which I don't need) fixed it.
     
  27. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    138
    Hi, Can I sort categories in System Info?

    I want to see MyApplicationVersion as soon as possible, by moving top of system information tab.
     
  28. HarisKap

    HarisKap

    Joined:
    Dec 10, 2012
    Posts:
    20
    Hello, I would like to ask if there is any way to increase the text font on the SRDebugger, our options list is hard to read.
     
    Last edited: May 12, 2017
  29. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I haven't been able to reproduce the white-square problem with the trigger on Unity 5.6.0f3 and Windows 10. Does it occur when installing SRDebugger into an empty project or using it in an empty scene?

    Hi, this isn't currently possible. I will add an option for inserting info at the start of the list for the next version.

    At the moment, no. The next version will have a UI Scale option in the configuration, and handle different screen DPI better.


    I am considering dropping support for Unity 4.7 and versions of Unity 5 lower than 5.4. Are any users using these versions and would be impacted by this?
     
  30. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Hi there, I started implementing SRDebugger into my project today for the first time. It's a great asset from what I'm seeing so far, and I'm glad I purchased it.

    I was able to implement the bug reporting successfully, however the first time I requested the API key, it said the request timed out, even though I received an email.

    I had some questions:

    1. I have "Show Cursor" disabled in the settings so that I can manually enable/disable the cursor when necessary. If I disable the cursor before opening the console, and then enable it after it's open, when I close the panel, the cursor disappears again, presumably because it is remembering the state before it was open.

    I thought that disabling "Show Cursor" would bypass all cursor handling of SRDebugger so I could handle it myself. Is it possible to have a setting where SRDebugger does not handle the cursor at all?

    2. I noticed that when disabling the console, that only the CanvasGroup gets set to non-interactable and the alpha to 0, resulting in 2 unnecessary drawcalls because it's active but not displaying. Wouldn't it be better to enable/disable the Canvas's GameObject instead? Unless the GameObject needs to be active for some reason, but it seemed fine when I manually enabled/disabled it.

    3. Would it be possible to add transparency amount (0 - 1) as a setting next next to "Background Transparency"?

    4. There seems to be several references to Stompy Robot LTD in the console, and right now it comes across as if Stompy Robot is the developer of my game. I know it's possible to edit all the prefabs, but I'd have to do that every time the asset gets updated. A simple setting to disable these so that the console has a generic look would be great if possible.

    Thanks.
     
  31. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @Korindian, sorry for the late reply.

    This is definitely a bug. I'll have it fixed in the next version.

    This is intentional. There is a large overhead to enabling a complex hierarchy of UI elements that would result in long pause on slower devices when opening the panel. It's much faster to hide via a canvas group. If you have performance concerns, holding the "close" button of the panel will completely unload it from the scene.

    Added to the to-do list.

    I've been careful to write such messages that it is clear they refer to SRDebugger. Is there a specific place you do not feel this is not the case?
     
  32. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Thanks for responding. I didn't know about the hold "Close" button feature, and I understand why you decided to use the CanvasGroup instead.

    True, in all cases it is clear that the references are to SRDebugger. It is just a personal preference that I would rather not have references to other developer companies in my game as an advertisement unless it is in the credits, especially as I'll be including the console as part of the final game and not just for debugging, and I don't have that many references to my own company so it's a little bit of a conflict in my game. Don't worry about this particular request though, as you've inspired me to create a custom console for my game.

    I thank you for the well-made asset and do not have any regrets in purchasing it, and may use SRDebugger as is on future projects. Will leave a 5-star review soon.
     
  33. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    @Korindian, thanks for leaving the review. I really appreciate it.

    I'll consider adding some customisation options to a future version for people who want to change the logos to suit their project without worrying about the prefabs being overwritten by updates.
     
  34. FrankRizzo890

    FrankRizzo890

    Joined:
    May 13, 2017
    Posts:
    6
    When I run my project, I get these errors:

    [SRDebugger] Error loading trigger prefab
    UnityEngine.Debug:LogError(Object)
    SRDebugger.Services.Implementation.DebugTriggerImpl:CreateTrigger()
    SRDebugger.Services.Implementation.DebugTriggerImpl:set_IsEnabled(Boolean)
    SRDebugger.Services.Implementation.SRDebugService:.ctor()
    System.Activator:CreateInstance(Type)
    SRF.Service.SRServiceManager:DefaultServiceConstructor(Type, Type)
    SRF.Service.SRServiceManager:AutoCreateService(Type)
    SRF.Service.SRServiceManager:GetServiceInternal(Type)
    SRF.Service.SRServiceManager:GetService()
    SRDebug:Init()
    SRDebugger.AutoInitialize:OnLoad()

    Can anyone give me a point in the right direction?
     
  35. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @FrankRizzo890,

    Have you changed the SRDebugger directory structure in some way? It looks like SRDebugger is failing to find one of the resources it uses. If not, try removing the StompyRobot directory and reimporting.
     
  36. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    78
    Hello,

    Really like SRDebugger and its apporach to adding debug options. We use it daily to test our games and it works well but there are just a few things I would like to ask if its already possible somehow or suggest for the future:

    Action Button Validation:
    Would it be possible to add a validation method attribute? Similar to how the unity MenuItem works, you could give it a function that would return true/false and then the button would enable/disable (grey out). This would help a lot by seeing which buttons are NOT available at a given time. Current our workaround is to pop up a message saying that you can't use it.

    Action Button Visiblity:
    Same as above, except controls whether the button shows up or not at all. I realize you can do this with containers and adding them at runtime but sometimes we just want to hide/show certain elements, not the entire container.

    Button Color:
    Ability to tint or colorize a button or category. Its just helpful to group things into colors sometimes when you have hundreds of things.

    Just wanted to throw these out there, as we may try to implement them ourselves but we would rather not modify the source code so we can update easier!
     
  37. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @JAMiller,

    These are all good suggestions. I'll add them to the roadmap, but no promises they'll make it in to a release yet.

    Re. validation + visibility, as a user when would you expect these methods to be called? When the panel is opened, every frame, or something else?
     
  38. wilczarz_84

    wilczarz_84

    Joined:
    Jan 6, 2017
    Posts:
    21
    I get white squares too with 1.6.2.. very annoying. Do you have any fix for this?
    I uploaded screenshot here: http://imgur.com/HJSlvTs
     
  39. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Please try reimporting the SRDebugger package. It looks like the image references have been lost somehow.
     
  40. wilczarz_84

    wilczarz_84

    Joined:
    Jan 6, 2017
    Posts:
    21
    Reimporting does not help.
    And it seems it's not the references getting lost, but the files themselves. These sprites are not physically in the imported package (only a few of them inside StompyRobot folder)

    http://imgur.com/3f7ph0e
     
  41. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I've just tried importing the 1.6.2 package from asset store with Unity 5.6 and Unity 2017.1 and it seems to work fine on my end.

    - Could you tell me which version of Unity and what OS you are importing with?
    - Does SRDebugger work in a new, empty project?
    - If you have visible .meta files enabled, please try importing into an empty project and copying the StompyRobot directory to your existing project.
     
  42. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    The "Welcome" screen pops up every time I start Unity. It happens on multiple versions of Unity with different versions of SRDebugger. It's been doing this for years. How can I make it stop??

    (Sorry if this was already answered, Unity forum search is worthless).
     
  43. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi @NunSuperior. I didn't anticipate people using multiple different versions of SRDebugger in different projects, so there isn't an option to disable this popup. You can comment out the "return true" that is causing the popup with different versions @ StompyRobot\SRDebugger\Scripts\Editor\WelcomeWindow.cs line 51.

    Is there a reason you can't update all the projects to the same version of SRDebugger? I'll see about adding a disable option for this in the future in any case.
     
  44. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Thanks for the location of the source. A simple "Don't show this again" type option would be great.

    I use SRDebugger in almost all my projects. When I go between projects or open up prototypes they almost always have whatever the latest SRD was at that time. Which means they are all different.
     
  45. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Hi, I'm working with Unity 5.6.3f1 for a while and I still get this error.
    I also added SRDEBUG symbol and in the log, when I start the game, I get:
    [SRServiceManager] Services Discovered: 0

    Then I realized that the issue is due to the location of the SRF folder. I have it in the Plugins subfolder together with TypeSafe, but SRDebugger is in the main Assets folder, as I have to access my classes in the SROptions partial class.
    I had to move everything outside to get it to work.
    I would prefer to have Type Safe and SRF in the plugins folder to avoid the compilation of those files every time. Or to have them in a DLL form.
    Something is changed from Unity 5.5 but I don't know what. Any idea why and how to solve it?
     
  46. gaiomed

    gaiomed

    Joined:
    May 5, 2013
    Posts:
    48
    Hi,

    how is the updating of values working in the options view:
    INotifyPropertyChanged should be implemented but how? I tried some things but it didn't work...
    Can u show how this is meant to be done, plz?
    best,
    Robert
     
  47. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    Hi,

    If you are using the SROptions class, simply call this.OnPropertyChanged("YourPropertyName) in the property setter. You don't need to implement the INotifyPropertyChanged interface when using SROptions. There is an example under the "OnPropertyChanged" section in the documentation: https://www.stompyrobot.uk/tools/srdebugger/documentation/#properties

    Code (CSharp):
    1. private int _netBytesIn;
    2. [Category("Net")]
    3. public int NetBytesIn {
    4.     get { return _netBytesIn; }
    5.     set {
    6.         _netBytesIn = value;
    7.         OnPropertyChanged("NetBytesIn");
    8.     }
    9. }
    10.  
    If you're using an Options Container, then you need to implement the INotifyPropertyChanged interface yourself.
     
  48. Simie

    Simie

    Joined:
    Oct 26, 2012
    Posts:
    456
    I see, that explains a lot. It's weird that the behaviour would have changed from Unity 5.5, though.

    Two possible solutions:
    - Move SRDebugger into the Plugins folder and use an Option Container in place of SROptions. You can make it a singleton yourself using a static property and just call SRDebug.Instance.AddOptionContainer(MCOptions.Current); near the start of your game. You could use a [RuntimeInitializeOnLoadMethod] to automatically add it whenever your game starts.

    - Move just the SRF/Scripts/Service folder out of your plugins directory. It searches the assembly that contains the SRServiceManager class for services, which is why it's not picking up SRDebugger when it's in the plugins assembly.
     
    mcmorry likes this.
  49. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Thanks :) I'll try to use the option container then
     
  50. gaiomed

    gaiomed

    Joined:
    May 5, 2013
    Posts:
    48
    Hi, I exactly followed the documentation but it doesnt update the value, just if I switch between views.

    public partial class SROptions
    {
    [NumberRange(0, 10)]
    [Category("Arduino Connection")]
    public int Value
    {
    get
    {
    return GameObject.FindObjectOfType<PlantInteraction>().config.value;
    }
    set
    {
    GameObject.FindObjectOfType<PlantInteraction>().config.value = value;
    OnPropertyChanged("Value");
    }
    }

    So my config value is incremented per frame but it stays the same in the OptionsGUI just if I switch back and forth between console and options it refreshes, but it does that without the OnPropertyChanged line too...
    For me this is not working Unity 5.6, that's why I wondered if I need to implement the interface myself as u somehow cryptic mentioned in the docs...
    thx,
    Robert