HAPI Methods
The HAPI class has multiple methods to save you time and enhance your workflow.
Finding an object by name near a position
Sometimes there's multiple objects with the same name so if you have your object position you can use this method to find it more accurately.
GameObject FindGameObjectNearPos(string name, Vector3 position)
// This allows you to get the nearest object from this position that matches the name.
Finding an object by its hierarchy path
This is probably the most accurate way of finding buildings or static objects if you want to interact with them.
GameObject FindGameObjectByPath(string path)
// This allows you to get an object by its hierarchy path
Saving the game
This one is pretty simple as you just call it to save the game.
HAPI.SaveGame();
Teleporting a player somewhere
HAPI gives you an extension method for the Player class so you can teleport an user wherever you want.
player.Teleport(new Vector3(0,0,0));
Kicking a player
Kicking a player can be done through the Kick extension method.
void Kick(this Player player, string reason = "You have been kicked from the server !")
Banning a player
Banning a player can also be done using HAPI with the Ban extension method.
void Ban(this Player player, string reason = "You have been banned from the server !")
Last updated