- 編集済み
Script 'Animation' has the same name as built-in Unity comp
Hello there,
I've just installed Unity 2019.2.9f1 and Spine-Unity 3.8 (Oct 15, 2019) and got this warning in the Console...:
Script 'Animation' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.
I don't even know if I should be worried about this, because I'm no programmer and I use PlayMaker to make my thing. :rolleyes:
Should I be worried?
Hi. Please ignore this warning, it's just that Unity is over-cautious with class names. Animation is in it's own namespace and in fact not even a Component, therefore you cannot do anything wrong.
Long story, as posted by Pharan in the past:
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.
Thanks!
I would have known this if I had a modicum of programming knowledge, I guess. Which is definitely not the case, lol.
No problem.