View
View code must use the Page/ / ฮปModal for each /.
Getting a reference with SerializeField
[SerializeField] private TMPro.TMP_InputField idInputField;
[SerializeField] private TMPro.TMP_InputField passwordInputField;
[SerializeField] private Button signInButton;ID Input Fields
PW input field
Login button
for the login button.
Exposing events with UniTask
public IUniTaskAsyncEnumerable<AsyncUnit> OnSignInButtonClickedAsync => signInButton.OnClickAsAsyncEnumerable();
public IUniTaskAsyncEnumerable<string> OnIdInputFieldEditAsync => idInputField.OnValueChangedAsAsyncEnumerable();
public IUniTaskAsyncEnumerable<string> OnPasswordInputFieldEditAsync => passwordInputField.OnValueChangedAsAsyncEnumerable();Expose events using IUniTaskAsyncEnumerable.
Using IUniTaskAsyncEnumerable has the advantage of making your code easier to process and more readable, such as processing input through an input buffer or ignoring duplicate inputs while they are being processed.
These will be used by the Liftcycle (presenter) side.
Other Lifecycle-side methods to use
Finished code
Last updated