[英]How can I fix this error (CS0102) in Unity 2d
So I am creating my first game in unity.
所以我正在创建我的第一个统一游戏。 I am currently working on the left to right movement and getting error:
我目前正在处理从左到右的运动并出现错误:
CS0102
CS0102
I assume your class inherits from another (if not, please paste your whole class into your question).我假设您的班级继承自另一个班级(如果不是,请将您的整个班级粘贴到您的问题中)。 The error means that
CrossPlatformInputManager
is already defined in the class you inherited from, and you're trying to define it again.该错误意味着
CrossPlatformInputManager
已在您继承的类中定义,并且您正在尝试再次定义它。
You have two options:您有两个选择:
new
keyword.new
关键字标记它。 In the future, please paste your code and the errors into your question, rather than using images.将来,请将您的代码和错误粘贴到您的问题中,而不是使用图像。 Your image is very hard to read, and it makes it harder to answer your question because we can't copy the error message or your code ourselves.
您的图片很难阅读,而且很难回答您的问题,因为我们无法自己复制错误消息或您的代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.