There are two ways to use the UUID generator, in eidtor or at runtime. Make sure to have followed the installation steps first!
- Create new
UUIDManagerCSharp
node - That's it! The UUIID is generated automatically and is removed automatically when the node is removed.
- Add a
UUIDManagerCSharp
variable in the script you want to store the UUID node in
// Variables
UUIDManager uuidNode
- Set the variable by calling the
create_new_uuid()
script at_ready()
. The function takes in the parent to add the node to as a child.
// Variables
UUIDManager uuidNode
public override void _Ready(){
uuidNode = MinosUUIDGeneratorCSharp.CreateNewUUID(this);
}
The MinosUUIDGeneratorCSharp
script comes with 4 variables for debugging. By default they're set to true.
static bool printNewUUID = true
static bool printSuccessfulRemoval = true
static bool printFailedRemoval = true
static bool printNewUUIDNode = true
printNewUUID
will print a message when a new UUID is made and it's UUID.printSuccessfulRemoval
will print a message when a UUID is removed as well as the old UUID.printFailedRemoval
will print a message when a UUID was attempted to be removed but couldn't be found in the array.printNewUUIDNode
will print a message when a newUUIDManagerCSharp
node is made.