Skip to content

NotEnoughPhotons/NEDebug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Introduction

NEDebug is a debugging library geared towards mod developers of BONELAB. Whether you are a puritan using the SDK, or a Lava Gang code monkey, NEDebug is for you.

This library aims to make the process of debugging mods much easier, with one of the features allowing developers to visualize what is happening under the curtains.

Usage

NEDebug is a simple library that shouldn't require much documentation to explain, which is one of the goals of the project. Each function name should tell you exactly what it does. Anything not exposed publicly is marked as internal.

Functions

Console (Attributes)

  • NEConsoleCommand

Switches

  • NEDraw.ZTest

Drawing

  • NEDraw.DrawLine
  • NEDraw.DrawRay
  • NEDraw.DrawPlane
  • NEDraw.DrawBox
  • NEDraw.DrawDisc
  • NEDraw.DrawCylinder
  • NEDraw.DrawSphere

Logging

  • NELog.Log
  • NELog.Warning
  • NELog.Error

Recommendations

If you plan to use this library in your code, it is recommended you work in a debug build of your project. Using NEDebug in release builds may result in bad mod performance.

If you have to, wrap your NEDebug calls inside of a preprocessor block like so:

#if DEBUG
  using NEP.NEDebug;
#endif

// Some code later...
#if DEBUG
  NEDraw.DrawSphere(transform.position, Quaternion.identity, Color.white, radius: 1.0f);
  NEDraw.DrawRay(new Ray(transform.position, transform.forward), Color.red);
#endif

Packages

No packages published

Languages