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

Created Color and Color32 Variables, Collections, and References #63

Merged

Conversation

jeffcampbellmakesgames
Copy link
Contributor

Summary

This PR implements Variables, Collections, and Reference types for the native Unity structs Color (RGBA color representation where float component values are clamped from 0-1) and Color32 (RGBA color representation where byte component values are clamped from 0-255). The benefits of being able to have these available in these types is that it makes it easier to perform data-driven design via scriptable color assets.

image

image

Testing

The last commit on the branch is for PR testing and can be discarded after review+approval has concluded. I've created a test scene and script at Assets/PR Test Content/Scripts/ColorTestScene.unity and Assets/PR Test Content/Scenes/ColorColor32Example.cs that should make it easy to assess these new types and ensure that they are working properly.

Changes

Created Color, Color32 Variable, Reference, and Collection

  • Created Color and Color32 versions of Variables, References, and Collections using the native Unity Color/Color32 structs.

jzapdot added 2 commits April 19, 2019 09:07
* Created Color and Color32 versions of Variables, References, and Collections using the native Unity Color/Color32 structs.
* This is PR test content meant to make this easier to review and can be discarded prior to merging.
@jeffcampbellmakesgames
Copy link
Contributor Author

One thing to note is that I did not create icons for these

jzapdot added 2 commits April 19, 2019 11:30
* Modified Color/Color32 variables asset menu so they sit in the "Structs" sub menu
@DanielEverland DanielEverland added this to the Release 1.6.0 milestone Apr 20, 2019
@DanielEverland DanielEverland merged commit fc6c28f into DanielEverland:master Apr 21, 2019
@jeffcampbellmakesgames jeffcampbellmakesgames deleted the color_variable branch April 22, 2019 05:26
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

Successfully merging this pull request may close these issues.

3 participants