Builder
Concepts
Example code in the Sign In Modal
public class SignInModalBuilder : ModalBuilderBase<SignInModalLifecycle, SignInModalView>
{
public SignInModalBuilder(bool playAnimation) : base(playAnimation)
{
}
}If you want to pass parameters to the screen call, you can use the
namespace ScreenSystem.Modal
{
public abstract class ModalBuilderBase<TModal, TModalView, TParameter> : ModalBuilderBase<TModal, TModalView>
where TModal : IModal
where TModalView : ModalViewBase
{
public ModalBuilderBase(TParameter parameter, bool playAnimation = true, string overridePrefabName = null);
protected override void SetUpParameter(LifetimeScope lifetimeScope);
public async UniTask<IModal> Build(ModalContainer modalContainer, LifetimeScope parent, CancellationToken cancellationToken);
}
public abstract class ModalBuilderBase<TModal, TModalView> : IModalBuilder
where TModal : IModal
where TModalView : ModalViewBase
{
public ModalBuilderBase(bool playAnimation = true, string overridePrefabName = null);
}
}Last updated