protected override void InitializeComponent(IUIContext context, bool isPlaying) { base.InitializeComponent(context, isPlaying); if (!isPlaying) { return; } var layout = this.GetOrAddComponent <LayoutElement>(); layout.ignoreLayout = true; var image = this.GetOrAddComponent <Image>(); image.color = Color.clear; UpdatePosition(RectTransform); _cursor.Value = Cursor; _tracker = new InteractionHandler <ResizeHandle>( this, new PointerPresenceTracker <ResizeHandle>(this), new PointerDragTracker <ResizeHandle>(this)); _tracker.Initialize(); _interactable .Subscribe(v => _tracker.Interactable = v, Debug.LogError) .AddTo(this); OnDrag .Where(_ => Target != null) .Subscribe(Resize, Debug.LogError) .AddTo(this); }