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 Daniel G · Jul 03, 2013 at 10:23 PM · c#javascript

iTween Visual Editor Event Call from C# to Javascript

Hello, I realize what I am asking, I will learn C# soon, but is there any one thats willing to give a couple seconds of their time to help me figure out how to write an iTween event call in Javascript? I know how to write Javascript pretty well. I'm lost with c# currently :P

 //Do i need to define this in Javascipt? What is its function?
 public class StartAndStopTween : MonoBehaviour {
 
 //This is what I'm really interested in.
 iTweenEvent.GetEvent(target, "Bounce").Play();
 }

Thank You! Daniel

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Em3rgency · Jul 03, 2013 at 10:45 PM

You don't need to define the StartAndStopTween class, if you don't want to. At least, from the snippet you show.

As for the iTweenEvent call, its just a regular function. Function calls are the same in both c# and js, as far as I know. Just make sure iTweenEvent is properly defined (because its not in this script, and its not a built-in thing, at least not in MY unity). And yeah, if you want code rewritten, give the whole code.

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 Daniel G · Jul 03, 2013 at 10:59 PM 0
Share

Hello, @Em3rgency I took understand your suggestion but i think that the BOUNCE is referring to the NA$$anonymous$$E of the iTween Visual Editor Script component that i made.

Here is the full code I will be using, And a picture of the NA$$anonymous$$E var i am talking about, also this is not a standard iTween event call i dont think, this is an extension made by another guy other than robert.

In the picture the NA$$anonymous$$E is highlighted in BLUE

 var initialColor:Color;
 var SelectColor:Color;
 var SelectSound : AudioClip;
 var FingerOverSound : AudioClip;
 //var CrashSound : AudioClip;
 
 
 function Start()
 {
     initialColor = renderer.material.color;
 }
 
 
 function On$$anonymous$$ouseExit(){
 
     renderer.material.color = initialColor;    
 }
 
 function On$$anonymous$$ouseOver(){
     renderer.material.color = SelectColor;    
 }
 
 function On$$anonymous$$ouseEnter () {
     audio.clip = FingerOverSound;
     audio.Play();
 }
 
 function On$$anonymous$$ouseDown () {
     audio.clip = SelectSound;
     audio.Play();
     //$$anonymous$$ove to multiplayer$$anonymous$$enu First
     //Cause the menu to FALL to the Ground
     rigidbody.constraints = RigidbodyConstraints.None;
     iTweenEvent.GetEvent(target, "$$anonymous$$ain$$anonymous$$enuTo$$anonymous$$ultiplayerOptions").Play(); //This is the line.
 
 }


alt text

screen shot 2013-07-03 at 6.58.29 pm.png (148.5 kB)
avatar image Daniel G · Jul 03, 2013 at 11:02 PM 0
Share

Also if you want this extension, it is FREE! just go to http://itween.pixelplacement.com/gettingstarted.php and find the "iTween Visual Editor" click on the link and download it from the asset store its a great tool! I just need to learn how to CALL the events from the COD$$anonymous$$ :D

avatar image Em3rgency · Jul 03, 2013 at 11:46 PM 0
Share

Ok, so does iTweenEvent.GetEvent(target, "$$anonymous$$ain$$anonymous$$enuTo$$anonymous$$ultiplayerOptions").Play(); work or not?

Because your question is in c#, your new example is in js. As you can see the calls are exactly the same. No conversion needed.

And for the record, you should really ask this sort of thing at itween, whoever made that, not at unity answers :)

avatar image Daniel G · Jul 04, 2013 at 12:03 AM 0
Share

Yes got it to work! It was $$anonymous$$y own fault! I read that you had to have the iTween.cs in the plugins folder, For any one else in countering an error with iTween Visual Editor while using java script do this:

iTween Visual Editor version 0.6.1

After installation, if you have a Javascript based project it is highly recommended that you run the "Component/iTween/Prepare Visual Editor for Javascript Usage" command. This will copy files into your Plugins directory which is necessary for the visual editor events to be called from Javascript. C# based projects require no further configuration.

Thanks for the help em3rgency! $$anonymous$$

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

15 People are following this question.

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

Related Questions

Multiple Cars not working 1 Answer

Parent Object Via Code C# 3 Answers

Changing material Color using RBG? 3 Answers

Has anyone got a Toggle key script? 3 Answers

Player Jumps instead of moving forward 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