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

Use NonAlloc method variants #296

Open
bddckr opened this issue Feb 24, 2019 · 0 comments
Open

Use NonAlloc method variants #296

bddckr opened this issue Feb 24, 2019 · 0 comments
Labels
enhancement Making something better w_ready waffle.io label
Projects

Comments

@bddckr
Copy link
Contributor

bddckr commented Feb 24, 2019

This should be done in the VRTK repo, too (not sure if there is actually any usage).

The Physics class comes with several variants of the currently used methods that prevent GC allocs. We should use them - I think we should be fine allocating a pretty big static Collider array to be reused in any of these calls to make our own API not care about that detail. (A big array is needed because Unity doesn't take a List, they want an array instead. This means they won't resize it, so we have to ensure our passed array is big enough to fit all the results a caller is interested in.)

If needed we may want to leave it up to callers of our API to pass in an optional array and we'll forward it for them to the correct call.

@bddckr bddckr added enhancement Making something better w_ready waffle.io label labels Feb 24, 2019
@thestonefox thestonefox added this to In Review in VRTK Apr 2, 2019
@thestonefox thestonefox moved this from In Review to In progress in VRTK May 9, 2019
@thestonefox thestonefox moved this from In progress to Ready To Be Worked On in VRTK May 11, 2019
@thestonefox thestonefox moved this from Ready To Be Worked On to To do in VRTK Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making something better w_ready waffle.io label
Projects
VRTK
  
To do
Development

No branches or pull requests

1 participant