HBU Functions

The HBU class contains many useful functions for a wide variety of purposes.

## HBU Class functions, methods, and fields:

* HBU.curBrowserAssetPath
* curBrowserAssetName
* curBrowserImagePath
* curBrowserImage
* curGadgetAssetPath
* curGadgetAssetName
* curGadgetImagePath
* curGadgetImage
* errorTexture
* errorSprite
* Mono
* OnApplicationQuit()
* ResetAllCallbacks()
* ResetCallback(HBUCallback callbackType)
* UnRegisterCallback(string id)
* RegisterCallback(HBUCallback callbackType, string id, Action action)
* TriggerCallback(HBUCallback callbackType)
* ChatAddMessage(string who, string mssg)
* ChatAddMessage(string who, string mssg, string colorHex)
* OpenUrl(string url)
* SetDiscordDetails(string msg)
* SetDiscordState(string state)
* OpenMainMenu()
* CloseMainMenu()
* PlayerNotificationMessage(string mssg)
* Vibrate(int motorIndex, float intensity, float duration)
* SetLockState(CursorLockMode mode)
* InFocus()
* LostFocus()
* GetGameTime()
* DisableControl()
* DisableLookAround()
* DisableScroll()
* SetInMenu()
* DisableEscMenu()
* DisableEscVehicle()
* GetServerSetting(string setting)
* TryGetServerSetting(string setting, out object ret)
* MayControle()
* CanControl
* CanLookAround
* CanScroll
* InMenu
* CanEscMenu
* CanEscVehicle
* GetUpdateDate()
* GetPostProcessingLayer()
* GetPostProcessing()
* CalcTravelDistance(Vector3 point, Vector3 velocity, float slugMassGrams, float slugDiameterMM, float Cd, out Vector3 hitPoint, out Vector3 normal, float maxTravelDist = 30000f)
* GetPlayers()
* TakeScreenshot(string path, Action onFinished, int superSize = 1)
* \_TakeScreenshot(string path, Action onFinished, int superSize)
* RoundGameObjectScale(GameObject obj)
* GetGameObjectBounds(GameObject obj)
* GetGameObjectBoundsWorld(GameObject obj)
* AttachWaypoint(GameObject obj, Vector3 pos, string type, string text = "", bool enableInBuilder = false, bool enableInMenu = false, bool enableIfSelected = true, bool enableIfEnemy = true)
* DestroyWaypoint(GameObject obj)
* OpenBrowser(string[] paths, string[] types, string[] tags, Action<string> onReturn, Action onCancel, bool includeParts = false, bool lookForProjects = false)
* SaveValue(string name, string valueName, string value)
* LoadValue(string name, string valueName)
* LoadOfficialValue(string name, string valueName)
* CurrentSeat()
* CurrentSeatKeys()
* CurrentSeatKeysHash()
* CurrentSeatKeysToFile(string path)
* FileToCurrentSeatKeys(string path)
* TeleportPlayer(UnityEngine.Vector3d pos)
* TeleportPlayer(Vector3 pos)
* GetTeleportLocations()
* GetNearestTeleportLocation()
* joystickMode
* InSeat()
* InMainMenu()
* InBuilder()
* SetInBuilder(bool t)
* SetNoControl(bool t)
* SetLocalVehicleCountLimit(int c)
* GetLocalVehicleCountLimit()
* GetVehicleCountLimit()
* GetMyOldestVehicle()
* GetSpawnError(string assetPath)
* CanSpawnVehicle(string assetPath)
* CanSpawnVehicleExt(string assetPath, out string mssg)
* SpawnVehicle(Vector3 position, Quaternion rotation, string assetPath)
* SpawnVehicleAsync(Vector3 position, Quaternion rotation, string assetPath, Action<GameObject> onReturn, Action<string> onError)
* StopSpawnVehicleAsync(string id)
* InitializeVehicle(GameObject vehicle)
* DropVehicle(GameObject vehicle)
* CleanupVehicle()
* GetKey(string name)
* CreateKey(string data)
* GetKeyData(HBKeyBind k)
* GetKeyNames()
* RegisterKey(HBKeyBind k)
* UnRegisterKey(HBKeyBind k)
* GetKeys()
* DisableControl(InputType t)
* DisableControl(InputType t, int i)
* DisableControl(HBKeyBind b)
* GetKeyMainSprite(string name, bool returnJoystick)
* GetKeySpriteRaw(string name)

####