GreenHell Modding
  • Welcome to the GreenHell Modding docs!
  • TUTORIALS
    • How to install GreenHellModLoader
      • Troubleshooting
    • How to install a mod
    • Mods in multiplayer
  • MODDING TUTORIALS
    • How to create a mod project
      • The modinfo.json file
    • How to create an AssetBundle
  • CLIENT - CODE EXAMPLES
    • Reading private variables
    • Modifying private variables
    • Accessing the player instance
    • Giving items to a player
    • Modifying the inventory max weight
    • Unlocking everything in the Notepad
    • Disabling player movement
    • Toggling the mouse/cursor
    • Printing to the console
  • WEBSITE
    • Slugs
Powered by GitBook
On this page

Was this helpful?

  1. CLIENT - CODE EXAMPLES

Printing to the console

To print to the console we use the unity Debug class as shown below.

Debug.Log("This is a simple log.");
Debug.LogAssert("This is an assert...");
Debug.LogError("This is an error...");
Debug.LogException("This is an exception...");
Debug.LogWarning("This is a warning...");
Debug.Log(new Vector3(0,0,0));
Debug.Log(myvalue);

When using the System namespace its Debug class might do some weird stuff. You can use UnityEngine.Debug.Log() or simply add using Debug = UnityEngine.Debug; at the top of your class after the imports.

PreviousToggling the mouse/cursorNextSlugs

Last updated 5 years ago

Was this helpful?