Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Wrap references to classes defined in Stubs namespace? #120

Closed
mxashlynn opened this issue May 13, 2019 · 4 comments
Closed

Wrap references to classes defined in Stubs namespace? #120

mxashlynn opened this issue May 13, 2019 · 4 comments
Assignees
Labels
Needs More Info Further information is requested.
Milestone

Comments

@mxashlynn
Copy link
Owner

Consider wrapping references to raw Vector2Ints and Colors so that

#if UNITY_2018_4_OR_NEWER
using UnityEngine;
#else
using ParquetClassLibrary.Stubs;
#endif

only shows up in one or two files.

@mxashlynn mxashlynn added this to the Alpha milestone May 13, 2019
@mxashlynn mxashlynn self-assigned this May 13, 2019
@mxashlynn
Copy link
Owner Author

mxashlynn commented May 13, 2019

I'm not actually sure if this is a great idea.

  • PROs:
    • Easier to verify/maintain code correctness with regard to conditional compilation
    • Isolates library classes from Unity engine
  • CONs:
    • adds additional complexity to the inheritance graph

@mxashlynn
Copy link
Owner Author

See #119.

@mxashlynn mxashlynn added the Needs More Info Further information is requested. label May 13, 2019
@mxashlynn
Copy link
Owner Author

There might be a better way to handle this. Is it possible to move the classes into Utilities and have the Unity classes supercede ours when available? Like, essentially treat ours as aliases for Unity's?

@mxashlynn
Copy link
Owner Author

Stubs were rolled into Utilities and entirely separated from Unity.
Client code will have to provide a means for conversion; a simple implicit conversion would be easy to provide in the wiki.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs More Info Further information is requested.
Projects
None yet
Development

No branches or pull requests

1 participant