Skip to content

GHPluginCoreLib is a modding library written to assist BepInEx plugin developers in developing plugins/mods for the Steam game "Grey Hack", which can be found here: https://store.steampowered.com/app/605230/Grey_Hack/.

Notifications You must be signed in to change notification settings

Arc8ne/GHPluginCoreLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GHPluginCoreLib

Contents

GHPluginCore type

Namespace

GHPluginCoreLib

Summary

The GHPluginCore class can be inherited from by your BepInEx plugin, however it is not mandatory for your BepInEx plugin to inherit from this class. The GHPluginCore class is responsible for implementing and exposing the functionality that this library offers (e.g. the ability to create and implement custom programs that can be used in GreyOS). It can be accessed through its "instance" field.

greyOSProgramManager constants

Summary

An instance of the GreyOSProgramManager, which allows you to register custom programs that can be executed and used in GreyOS, the operating system which a player's in-game computer runs on.

instance constants

Summary

An instance of the GHPluginCore class which can be used to access instances of other classes like the GreyOSProgramManager.

Init() method

Summary

This method must be called in the Awake method of your BepInEx plugin, preferably at the start of it if possible. It is responsible for executing crucial initialization procedures to ensure that the library works correctly.

Parameters

This method has no parameters.

GHPluginLogger type

Namespace

GHPluginCoreLib

Summary

The GHPluginLogger class allows you to log messages to the BepInEx console. It contains various helper methods to make logging much more convenient.

#ctor(sourceName) constructor

Summary
Parameters
Name Type Description
sourceName System.String

#ctor(logger) constructor

Summary
Parameters
Name Type Description
logger BepInEx.Logging.ManualLogSource

LogActiveSceneData(logAllSceneObjectsData) method

Summary

Logs all properties for the currently active Scene in the game, the second parameter specifies whether the properties of all GameObjects in the Scene should be logged as well.

Parameters
Name Type Description
logAllSceneObjectsData System.Boolean

LogActiveSceneGameObjectsNameAndParent() method

Summary

Logs the names of all the GameObjects in the currently active Scene in the game as well as the names of their parents.

Parameters

This method has no parameters.

LogAllGameObjectData(gameObject,logDataOfAllChildGameObjects,propertyNamesFilter) method

Summary

Logs all properties of a GameObject by default. It can also be used to log all properties of the GameObject and its children. The third parameter can be used to specify which properties of the GameObjects being logged should not be logged to the BepInEx debug console.

Parameters
Name Type Description
gameObject UnityEngine.GameObject
logDataOfAllChildGameObjects System.Boolean
propertyNamesFilter System.Collections.Generic.List{System.String}

LogException(exception) method

Summary

Logs information about an exception, including its message and its stack trace.

Parameters
Name Type Description
exception System.Exception

LogFileSystem(fileSystem) method

Summary

Logs the names of all the folders and files in a FileSystem instance.

Parameters
Name Type Description
fileSystem FileSystem

LogFolder(folder) method

Summary

Logs the name of the FileSystem.Carpeta instance specified in the first parameter as well as the name of all its subfolders and files.

Parameters
Name Type Description
folder FileSystem.Carpeta

LogGameObjectNameAndParent(gameObject,logChildObjects) method

Summary

Logs the name of a GameObject as well as the name of its parent, the second parameter specifies whether the same should be done for the children of the GameObject specified in the first parameter.

Parameters
Name Type Description
gameObject UnityEngine.GameObject
logChildObjects System.Boolean

LogInfo(msg) method

Summary

Logs a message to the BepInEx debug console.

Parameters
Name Type Description
msg System.String

LogSceneData(scene,logAllSceneObjectsData) method

Summary

Logs all properties for a Scene in the game, the second parameter specifies whether the properties of all GameObjects in the Scene should be logged as well.

Parameters
Name Type Description
scene UnityEngine.SceneManagement.Scene
logAllSceneObjectsData System.Boolean

LogSceneGameObjectsNameAndParent(scene) method

Summary

Logs the names of all the GameObjects in a Scene in the game as well as the names of their parents.

Parameters
Name Type Description
scene UnityEngine.SceneManagement.Scene

GHPluginUnityUtilityLogger type

Namespace

GHPluginCoreLib

Summary

The GHPluginUnityUtilityLogger class can be used to generate log files containing comprehensive and detailed information about a Unity scene.

#ctor() constructor

Summary

Default constructor method for the GHPluginUnityUtilityLogger class.

Parameters

This constructor has no parameters.

GenerateUnitySceneLogFileForActiveScene(outputPath,onlyLogActiveGameObjects,logAllComponentsData,logAllFieldsData,logAllPropertiesData,logAllMethodsData) method

Summary

Generates a log file for the currently active Unity scene in the game.

Parameters
Name Type Description
outputPath System.String
onlyLogActiveGameObjects System.Boolean
logAllComponentsData System.Boolean
logAllFieldsData System.Boolean
logAllPropertiesData System.Boolean
logAllMethodsData System.Boolean

GenerateUnitySceneLogFileForGameObject(gameObject,outputPath,onlyLogActiveGameObjects,logAllComponentsData,logAllFieldsData,logAllPropertiesData,logAllMethodsData) method

Summary

Generates a log file for the GameObject specified in the first parameter.

Parameters
Name Type Description
gameObject UnityEngine.GameObject
outputPath System.String
onlyLogActiveGameObjects System.Boolean
logAllComponentsData System.Boolean
logAllFieldsData System.Boolean
logAllPropertiesData System.Boolean
logAllMethodsData System.Boolean

GenerateUnitySceneLogFileForScene(scene,outputPath,onlyLogActiveGameObjects,logAllComponentsData,logAllFieldsData,logAllPropertiesData,logAllMethodsData) method

Summary

Generates a log file for the Unity scene specified in the first parameter.

Parameters
Name Type Description
scene UnityEngine.SceneManagement.Scene
outputPath System.String
onlyLogActiveGameObjects System.Boolean
logAllComponentsData System.Boolean
logAllFieldsData System.Boolean
logAllPropertiesData System.Boolean
logAllMethodsData System.Boolean

GHPluginUtilities type

Namespace

GHPluginCoreLib

Summary

The GHPluginUtilities class exposes several helper methods for BepInEx plugin developers to use.

GetComponentInGameObjectByName``1(gameObject,componentName) method

Summary

Returns the Component of one of the children of the GameObject specified in the first parameter with the same name as the one specified in the second parameter.

Returns
Parameters
Name Type Description
gameObject UnityEngine.GameObject
componentName System.String
Generic Types
Name Description
T

GreyOSProgram type

Namespace

GHPluginCoreLib

Summary

The GreyOSProgram class is the class from which custom programs that are meant to be run on a player's in-game computer must inherit from.

#ctor(programName,associatedAssetBundleFilePath,programPrefabName) constructor

Summary

The default constructor method for the GreyOSProgram class.

Parameters
Name Type Description
programName System.String
associatedAssetBundleFilePath System.String
programPrefabName System.String

#ctor(programName,programPrefab) constructor

Summary

A constructor for the GreyOSProgram class.

Parameters
Name Type Description
programName System.String
programPrefab UnityEngine.GameObject

associatedFile constants

Summary

The file associated with the program, this field will automatically be assigned to at runtime provided that the program has been registered with the GreyOSProgramManager.

programName constants

Summary

The name of the program.

programPrefab constants

Summary

The prefab associated with the program.

Procesar(comando,currentFile,PID,terminal) method

Summary

This method can be overridden by the program's class provided that it inherits from the GreyOSProgram class. This method is called when a player opens the program either through the File Explorer or the Terminal.

Returns
Parameters
Name Type Description
comando System.String[]
currentFile FileSystem.Archivo
PID System.Int32
terminal Terminal

GreyOSProgramManager type

Namespace

GHPluginCoreLib

Summary

The GreyOSProgramManager class is responsible for registering custom programs with GreyOS, the operating system that a player's in-game computer runs on. Programs registered with this class can be used through the in-game computer.

#ctor() constructor

Summary

Default constructor for the GreyOSProgramManager class.

Parameters

This constructor has no parameters.

registeredGreyOSPrograms constants

Summary

Contains a list of all the programs registered with the GreyOSProgramManager so far.

RegisterProgram(greyOSProgram) method

Summary

Registers a program with the GreyOSProgramManager.

Parameters
Name Type Description
greyOSProgram GHPluginCoreLib.GreyOSProgram

UnregisterProgram(greyOSProgram) method

Summary

Unregisters a program from the GreyOSProgramManager.

Parameters
Name Type Description
greyOSProgram GHPluginCoreLib.GreyOSProgram

About

GHPluginCoreLib is a modding library written to assist BepInEx plugin developers in developing plugins/mods for the Steam game "Grey Hack", which can be found here: https://store.steampowered.com/app/605230/Grey_Hack/.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages