-
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Hello and welcome to the Locker Wiki! I'm @nadjiel, the original creator of the Locker framework. Here you will find guides on how to use that Plugin, so that you have a solid base to be able to work with it.
The Locker Plugin is a framework created in the Godot 4.3 engine meant to simplify the process of saving, loading and managing data in Godot projects.
One of the main goals of this plugin is being open for user customizations, allowing the use of different user defined LokAccessStrategies for accessing data in different ways.
Another feature that this Plugin provides in order to achieve that goal is giving users the ability to customize what's the directory in which the save files should be stored, what should be their name, and in what partitions they should be divided.
All the Plugin's configurations are available in the "addons/locker"
path inside the
ProjectSettings
in the Godot Editor once the Plugin is
activated.
This Plugin was created initially as an attempt to learn about how saving and loading data works in the Godot Engine, but them, it escalated to a Plugin that I decided to publish in the Asset Library.
To make it so this Plugin is as easy as possible to get started with, I created some guides here in its Wiki. I recommend starting by reading the Getting Started guide after going through this introduction.
The Locker Plugin aims at giving users a smooth experience when it comes to importing it both to existing projects as well as to new ones.
One of the measures taken to make that importing easier in any project
is the use of the Lok
prefix in all of its classes as a sort of
namespace - since Godot doesn't have namespaces :( - so there's no
risk of them crashing with user's classes.
Given the complexity of the task that this Framework aims to achieve, it was also a priority making the code as understantable as possible. For that, the Godot convention of using underlines ( _ ) in the beginning of private members and methods was used, to make it clearer to users what they are expected to access from outer classes and what not.
This Plugin depends on the LokGlobalStorageManager
autoload in order to
achieve its tasks, which is automatically added to the autoload list
when the Plugin is activated.
That means if you import Locker without activating it, Godot will complain
because the LokGlobalStorageManager
isn't defined.
Make sure to activate the Plugin and reload your project if that happens.
That's also a solution if the Nodes added by the Plugin don't appear in your project's Node selection window.
Thanks for reading until here :D
Now that you got an introduction about the Locker Plugin, if you want to dive deeper on how to use this tool, I recommend reading the Getting Started guide, which aims at teaching you how to create a simple starter project with the Locker Framework.
Happy programming!