Hello Guest

Author Topic: Persistent tk2dUIItem message targets  (Read 2989 times)

Skywatch

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Persistent tk2dUIItem message targets
« on: October 16, 2013, 09:05:27 pm »
Hello, guys!

I've checked that some part of the tk2dUIItem editor prevents the user from assigning a persistent gameobject as its event target.

Although this makes sense in some scenarios, in others it does not. For instance, I have a button prefab with a tk2dUIItem which, when clicked, should call a method on itself. Since it is a prefab, therefore saved to disk, your editor code does not let me assign itself as it's message target.

I have edited the tk2dUIItemEditor code to allow this, but I'm afraid it gets overriden in future updates and my project's  prefabs' logic gets broken. Could you guys take a look at and rethink this situation?

Thank you in advance,

Mateus Azis
Skwyatch Games

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Persistent tk2dUIItem message targets
« Reply #1 on: October 17, 2013, 01:20:13 am »
Hi there,

This constraint has been removed in the current version (2.2.2) as far as I can tell. I can't remember specifically what version it was removed in, though. If you don't wish to update, then hacking a bit of code in there should be fine.