Skip to content

Managers

Feynmen edited this page Jun 18, 2018 · 9 revisions

Managers

The main logic of Managers is creating some instances which will contain the logic of features which will be needed in all application lifetime. For example Server Communication Logic.

Manager Using

Managers can be used only in classes which inherited from ControllerBase or SceneControllerBase using Injection

Example Manager

public class TestManager : IManager
{
	public void Init()
	{
			
	}

	public void Release()
	{
			
	}

	public void ShowTestMessage()
	{
		Debug.Log("Test message");
	}
}

IManager

public interface IManager: IInitializable, IReleaseble
{
}
public interface IInitializable
{
    void Init();
}
public interface IReleaseble
{
    void Release();
}

Clone this wiki locally