Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Mz3D · Jul 30, 2012 at 09:37 PM · javascripterrorcontrollerassetsspline

Spline Controller (javascript) error

I've downloaded the Javascript version of the Unify Community "Spline Controller", which consists of three javascript files (MathUtils.js, SplineController.js, and SplineInterpolator.js) but when i try to import the scripts as assets in my project i get this error message:

"Sistem.Collections.IComparer" is not a class. "extends" can only be used with classes. Did you mean "Implements"?

The error refers to SplineController.js

What's the problem? Do you know if i have to create specific folders in which i have to import these scripts? or maybe i have to load other specific assets necessary to make these scripts work?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Mortoc · Jul 30, 2012 at 09:48 PM

I'm not sure why the script wouldn't compile straight out of the box, but the compile error looks simple enough to fix. It's an interface you implement rather than a base class to extend. You can use it like this:

http://msdn.microsoft.com/en-us/library/h30d6hy0(v=vs.71).aspx

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mz3D · Jul 30, 2012 at 09:51 PM 0
Share

i don't understand, i'm quite new to scripting, what should i do? modify the splinecontroller.js code? how? have i to add something?

avatar image Mortoc · Jul 30, 2012 at 09:54 PM 0
Share

Yes, you'd have to modify splinecontroller.js in the way the article I linked describes. If that level of scripting is above your skill level, do the scripting tutorials on the Unity site, it'll serve you much better to understand these things work when using them.

avatar image Mz3D · Jul 30, 2012 at 10:01 PM 0
Share

are you sure the problem isn't because i miss some other script required to make this one work?

avatar image Mortoc · Jul 30, 2012 at 10:41 PM 0
Share

That particular error you have is because the wrong keyword is being used in your script. That just means there's an error in that script.

avatar image
0

Answer by Mz3D · Jul 30, 2012 at 11:31 PM

Solved! i had to add this declaration at the beginning!

 public class IComparer
 {
     //code
 }
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Jul 30, 2012 at 11:34 PM 0
Share

That doesn't make much sense. IComparer is an interface, not a class. The UnityScript syntax has been changed recently so you can also implement multiple interfaces in UnityScript, but you have to use the implements keyword ins$$anonymous$$d of extends.

extends now only works with base classes.

avatar image Mz3D · Jul 30, 2012 at 11:42 PM 0
Share

In fact, it didn't work! Now i changed "extends" with "implements" and it works!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

I've got a coding problem please help 1 Answer

Why am I getting this error repeatedly? 2 Answers

BCE0005: Unknown identifier: 'spriteRenderer'. 2 Answers

"Unknown error occurred while loading '(path to NavMesh.asset)'." when using NavMesh generated by someone else 1 Answer

How to check integrity of Assets? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges