News: Enjoy our Christmas offer 30% off on our latest package Tower Defense Level Kit http://u3d.as/m7h

  • May 21, 2018, 03:11:33 AM

Login with username, password and session length

Author Topic: Set User Defined Position of motion at runtime  (Read 349 times)

Offline giop

  • Newbie
  • *
  • Posts: 3
Set User Defined Position of motion at runtime
« on: October 10, 2017, 03:53:00 PM »
Hello,
is it possible to set the User Defined Position of a motion at runtime? I cannot find any clue in the docs.
Or does it just works with predefined values in the editor? I'd like to swap UI Images in a grid puzzle game.
Thanks!

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: Set User Defined Position of motion at runtime
« Reply #1 on: October 11, 2017, 12:20:54 PM »
Hi,

This has not been planned, however you can still access the component itself and modify the public property.

Can you tell me more about your swap, what do you want to do exactly on the screen ?

Offline giop

  • Newbie
  • *
  • Posts: 3
Re: Set User Defined Position of motion at runtime
« Reply #2 on: October 13, 2017, 04:00:04 PM »
I have a grid of UI images that have to swap positions when two of them are tapped. I thought of using your asset, but I have to set the final destination of the UI image on runtime. I didn't find a way to do it, and I used a simple tween to do that. So the problem is solved now, but I'd like to know if this is possible with Easy UI Motion.
Also I'd like to know if you're still mantaining the asset, since the last update is 1+ year old. I have some warnings in the last Unity version (2017.1.2f1). I love this asset and used it a lot in my projects, hope you're still working on it adding features!
Thanks for your work

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: Set User Defined Position of motion at runtime
« Reply #3 on: October 16, 2017, 01:00:21 AM »
Hi,

Do you try to access to the component at runtime ?

Offline giop

  • Newbie
  • *
  • Posts: 3
Re: Set User Defined Position of motion at runtime
« Reply #4 on: October 16, 2017, 02:54:58 PM »
Yes. Is it something like this?

gameObject.GetComponent<EMOpenCloseMotion>().openProp.moveEasing.... where is the User Defined Move Effect?
Thank you

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: Set User Defined Position of motion at runtime
« Reply #5 on: October 17, 2017, 08:04:15 AM »
Yes it is