- Home /
Question by
adem_rodriguez · Jun 08, 2021 at 07:08 AM ·
tools
changing console debug line
Hi , i write this wrapper class to add a new debug function which writes in the console with a certain color , it works , but the problem is that in the console the line shown is for the wrapper class itself and not where i call the function (which i know that it makes sense ) , but how do i change it so that i takes you directly to the place where i called the function , and not the wrapper.
public class Debug : UnityEngine.Debug
{
public static void LogColor(object message , Color color = default )
{
if(color == default )
color = Color.green;
Log( string.Format("<color=#{0:X2}{1:X2}{2:X2}>{3}</color>", (byte)(color.r * 255f), (byte) ( color.g * 255f ) , (byte) (color.b * 255f),message));
}
}
capture.png
(22.5 kB)
Comment
Answer by bubzy · Jun 08, 2021 at 09:38 AM
https://gist.github.com/AngryAnt/6176728
this may be helpful, you will probably have to do some digging about to tweak it though :)
so I don't have much time to dig about, and I couldn't quickly work out how to make it a normal message instead of a warning This may be helpful
Good Luck!
untitled.png
(7.9 kB)
Your answer
