Getting Started
Structure
READYgg SDK is divided into multiple modules. Every module has its own functionality. All modules depend on the RGNCore module. In the current version, the modules are distributed by using packages for Unity Package Manager.
Obligatory modules/packages
RGNCore
RGNImplFirebase
RGNSignInEmail
RGNSignInGuest
We plan to add more tests in the future to identify the minimum set of modules that may be integrated, however at this time, we do extensive testing only for the complete list of modules and Firebase dependencies. For now, having the complete list of modules installed into your project is recommended.
READYgg Unity Initializer
We created an initialization script to automatically setup every module. This script can manage automatically the guest signIn and the modules initialization. To use it, simply create an empty GameObject in your starting scene and attach RGNUnityInitilizer.cs to it. With this script, you don't need to manually build the RGNCore and modules.
Access modules
In the recent versions of READYgg SDK, we added a new way to access the module's functionality.
To access modules you can use the "I" instance provider property:
For example:
Important!
If you are not using the RGNUnityInitializer, you will need to do the following :
The module is initialized during the first invocation of the "I" instance provider property. There is some initialization code in the SignIn modules. If you want to initialize the modules in advance, you can add:
RGNCoreBuilder.AddModule(new [module_name]());
code before calling the RGNCoreBuilder.BuildAsync()
method.
Modules namespaces
The modules are located in the RGN.Modules.[module_name] namespaces. Here you can find a full list of modules with the namespaces:
You can use ready to use monobeh to initialize RGNCore. It is located in the GetReady.RGN.Impl.Firebase.Runtime assembly in RGN.Impl.Firebase namespace. The name of the class is "RGNUnityInitializer". Simply add it to the scene, the RGNCore will be initialized then in the Awake() method.
In case you want to initialize READYgg SDK yourself, then you need to make this call once when the app starts:
When you access the module by using the I
for the first time it is initialized and registered in the RGNCore. In case you want to initialize all modules in advance, you can use following snippet:
Disposing and cleaning out
When the application is exiting, or you want to initialize a new instance of RGNCore SDK, you need to call the Dispose()
method first:
Last updated