Author Topic: How to set NGUI delay property via code  (Read 2024 times)

unitymoo

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
How to set NGUI delay property via code
« on: January 01, 2017, 03:45:33 PM »
I'm trying to set the delay property of the TweenScale component in my code.
Just wondering how I can accomplish this?

Here's what I have tried so far:

   float myDelay = 1.0f;

   public void setDelay () {
      gameObject.GetComponent<TweenScale>.delay() = myDelay;
   }

I found this thread where it is mentioned that delay is a property:
http://www.tasharen.com/forum/index.php?topic=2231.0

note: I'm new so exact syntax is always a big help to me :)

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: How to set NGUI delay property via code
« Reply #1 on: January 01, 2017, 07:37:10 PM »
  1. transform.GetComponent<TweenScale>().delay = 2f;

unitymoo

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: How to set NGUI delay property via code
« Reply #2 on: January 01, 2017, 07:59:06 PM »
thank you