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

Unity class name warnings #60

Closed
mrmalee opened this issue Jun 6, 2013 · 3 comments
Closed

Unity class name warnings #60

mrmalee opened this issue Jun 6, 2013 · 3 comments

Comments

@mrmalee
Copy link

mrmalee commented Jun 6, 2013

Getting warnings from unity on the "Animation" class name:

Script 'Animation' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.

maybe worth changing to SpineAnimation?

@pharan
Copy link
Contributor

pharan commented Jun 7, 2013

Spine's Animation class is under the Spine namespace. So it's actually Spine.Animation. Unity (3.xx?) doesn't support namespaces for components (especially MonoBehaviour derived classes) but it's fine for classes like this acting as data structures, like most of the classes are in base Spine-C#.

Either way. Spine.Animation isn't a Unity component and it's certainly not a MonoBehaviour. So that warning actually makes no sense since you wouldn't be calling AddComponent or GetComponent with a Spine.Animation instance.

It is kind of annoying that MonoDevelop-Unity highlights Animation and AnimationState as if they were reserved keywords though.

@NathanSweet
Copy link
Member

Yep, silly warning, isn't actually a problem. I like the class names too much to change them. :)

@Atry
Copy link

Atry commented Oct 21, 2014

And how to disable this warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants