Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple Grabbable from BaseGrabber #40

Open
sohailshafiiWk opened this issue Apr 12, 2021 · 1 comment
Open

Decouple Grabbable from BaseGrabber #40

sohailshafiiWk opened this issue Apr 12, 2021 · 1 comment

Comments

@sohailshafiiWk
Copy link

Grabbable refers to BaseGrabber in its implementation, which can cause issues if other people want to use their own IGrabNotifiers. It might be a good idea for certain items like GrabBegin to use IGrabNotifier instead, however child classes like PhysicsGrabbable call GetComponent on the hand argument passed in, so using GameObject as the argument for GrabBegin can be a good compromise.

Now one issue with trying to decouple Grabbable from BaseGrabber is that the former does call the static function BaseGrabber.ClearAllGrabs in UnsubscriberGrabber. You might not be able to cleanly replace that specific code with an interface...

@MephestoKhaan
Copy link
Owner

That is a good idea.
Yes initially I tought people would want to provide their own Grabber-Grabbable pair (in my mind they go in hand) but I don't see a reason not to communicate with more generic intentions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants