RemoveElement.Awake C# (CSharp) Method

Awake() public method

public Awake ( ) : void
return void
    public void Awake()
    {
        Button button = GetComponent<Button>();
        button.onClick.AddListener(() => {
            var canvas = GetComponentInParent<Canvas>();
            var snap = canvas.GetComponentInChildren<ScrollSnap>();
            snap.PopLayoutElement();
        });
    }
RemoveElement