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

v2.2.0 has 2 warnings #44

Closed
iMobCoding opened this issue Feb 25, 2019 · 1 comment
Closed

v2.2.0 has 2 warnings #44

iMobCoding opened this issue Feb 25, 2019 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@iMobCoding
Copy link

iMobCoding commented Feb 25, 2019

  • UIParticle.cs(59,23): warning CS0649: Field 'UIParticle.AnimatableProperty.m_Type' is never assigned to, and will always have its default value
  • UIParticle.cs(57,11): warning CS0649: Field 'UIParticle.AnimatableProperty.m_Name' is never assigned to, and will always have its default value null

When serializing private fields, Unity will throw a warning about default values. So there should be:

string m_Name = null;
ShaderPropertyType m_Type = ShaderPropertyType.Color; // or any other default one

Or #pragma to suppress those warnings...

@mob-sakai
Copy link
Owner

Hi @crmagicxxx
Thank you for reporting!

@mob-sakai mob-sakai self-assigned this Feb 25, 2019
@mob-sakai mob-sakai added the bug Something isn't working label Feb 25, 2019
@mob-sakai mob-sakai added this to the 2.2.1 milestone Feb 25, 2019
mob-sakai added a commit that referenced this issue Feb 26, 2019
mob-sakai added a commit that referenced this issue Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants