I’m testing out some recoil effect for a shooter game. And it works perfectly in the editor. But when I create a build, the build doesnt do the effect. So I was wondering… Is there any way to make a build with a debugging console? Or something similar?
-thanks
EDIT: thanks for all the answers, but most of these are only alternate ways to display the Debug.Log(“”); function. I need to see if there will be any compiler errors or nullrefferenceexceptions. Thanks for the answers though
There isn’t an easy way to get a console for a build, but you can check the log file after you run it. The file will be in the data folder that comes with the build. It should list any errors encountered during runtime.
In other words, you sure can write your own DebugConsole which show up things at your own way. The only downside is you won’t be able to double click the line at Unity’s Console and get linked back to it in the source code.
–
Following the question edit, you want then to see the Log Files. It will depend on your platform, please refer to the docs. They’re currently at: Unity - Manual: Log files
But you still can use try & catch or simple error prevention and something like the DebugConsole. Maybe sending e-mails or a SOAP to your server reporting errors. It’s much more recommended.
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class Debug : MonoBehaviour
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern void OutputDebugString(string message);
void Start()
{
OutputDebugString("started...");
}
}