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

Make classes more extendable #7

Closed
floAr opened this issue Apr 13, 2016 · 3 comments
Closed

Make classes more extendable #7

floAr opened this issue Apr 13, 2016 · 3 comments

Comments

@floAr
Copy link

floAr commented Apr 13, 2016

Scenarios:
Gina is a developer. She wants to extend the GazeManager to provide a property for a field directly in front of the users gaze.
Desired code

40         private Vector3 gazeOrigin; 
41         private Vector3 gazeDirection; 
40         public Vector3 AheadOfGaze{ get { return gazeOrigin+gazeDirection; } }

Problem:

  1. By changing the GazeManager Gina needs to propagate this change to all customers using her scripts.
  2. Changing parts of the HoloToolkit itself locks Gina out from future updates and requires clients to change their HoloToolkit too (removing the 'drop-in-and-run' factor)

Proposed solution:
Make classes partial. Partial classes allow Gina to extend them using her own scripts and export her packages as a drop in component working on top of the base toolkit.
In GinaGazeManager.cs:

public partial class GazeManager{
 public Vector3 AheadOfGaze{ get { return gazeOrigin+gazeDirection; } }
}
@NeerajW
Copy link

NeerajW commented Apr 18, 2016

@floAr thank you for filing this issue and the great suggestion around making these classes partial.
The HoloToolkit moderators will triage the issues and get back to you with some suggestions.

@NeerajW
Copy link

NeerajW commented Apr 18, 2016

@floAr this seems like a good addition. Would you like to do this work?
If yes, we recommend waiting for the refactor branch work to finish and then work on this.

@floAr
Copy link
Author

floAr commented Apr 22, 2016

@NeerajW Yep, you can assign it to me

floAr added a commit to floAr/HoloToolkit-Unity that referenced this issue Apr 25, 2016
NeerajW pushed a commit that referenced this issue Oct 5, 2016
Merge from MSFT_HoloToolkit-master
StephenHodgson added a commit that referenced this issue Sep 2, 2017
fix bug in finding msbuild.exe path for vs 2017
StephenHodgson added a commit that referenced this issue Jan 31, 2018
StephenHodgson pushed a commit that referenced this issue May 28, 2018
* Adding missing generic "GetType" to def and removing redundant "Tuple" parameter

* Missing constructor

* Missing .Asset updates from rename?

* removed constructor. Added generic set value. (#6)

* removed constructor. Added generic set value.

* Updated tuple get data and wrote a test!

* updated raw checked value check with equals

* * Updated tests to include changed and generic methods
* resolved issues with IntDef PR for generic setter, changed and null check

* removed unnecessary value

* CRs for Interaction Definitions (#7)

* Updated Test cases, and even fixed a few bugs! yay! (#2180)

* Updated Test cases, and even fixed a few bugs! yay!

* Just a bit of cleanup.

* Added a way to easily cleanup the test scenes

* Updated custom assembly definition file names to reflect namespace

* Updated equality checks and tests

* finished up writing tests. bit of cleanup.
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this issue Jun 5, 2018
Update from upstream repo microsoft/MixedRealityToolkit-Unity@june18_dev
keveleigh pushed a commit to keveleigh/HoloToolkit-Unity that referenced this issue Jul 26, 2018
thalbern added a commit that referenced this issue May 2, 2019
julenka pushed a commit that referenced this issue May 16, 2019
keveleigh pushed a commit that referenced this issue Jun 6, 2019
keveleigh pushed a commit that referenced this issue Dec 19, 2019
RogPodge pushed a commit to RogPodge/MixedRealityToolkit-Unity that referenced this issue Dec 15, 2020
drusk-unity pushed a commit to drusk-unity/MixedRealityToolkit-Unity that referenced this issue Jun 23, 2023
…edExamples-to-MRTK3-#11510

Add ClippingInstancedExamples example
drusk-unity pushed a commit to drusk-unity/MixedRealityToolkit-Unity that referenced this issue Jun 26, 2023
…edExamples-to-MRTK3-#11510

Add ClippingInstancedExamples example
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