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 UUIDManager node
- That's it! The UUIID is generated automatically and is removed automatically when the node is removed.
- Add a
UUIDManager
variable in the script you want to store the UUID node in
extends Node2D
## Variables
var uuidNode : UUIDManager
- 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.
extends Node2D
## Variables
var uuidNode : UUIDManager
func _ready():
uuidNode = MinosUUIDGenerator.create_new_uuid(self)
The MinosUUIDGenerator
script comes with 4 variables for debugging. By default they're set to true.
static var printNewUUID : bool = true
static var printSuccessfulRemoval : bool = true
static var printFailedRemoval : bool = true
static var printNewUUIDNode : bool = 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 newUUIDManager
node is made.