2D Toolkit Forum
2D Toolkit => Support => Topic started by: JFBillingsley on September 19, 2013, 08:24:59 am
-
Repro steps:
1) Make a blank GameObject
2) Put a tk2dUIItem script on it
3) Drag that same GameObject into the "Send Message Target" slot on the tk2dUIItem
4) Drag the GameObject into the project pane to make it a prefab
The "Send Message target" slot in the prefab (and in any instances of it) is now null, and can never be changed. I swear it didn't use to do this with previous versions of TK2D...
-
Hi,
Yes this was a bug in a previous version of toolkit (http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,2356.msg11790.html#msg11790), good news is that I have just tested it in toolkit 2.2 final and it's been fixed now.
-
Great! Sadly I can't update to 2.2 on this project, buuut if it's a one-liner fix or something, can you let me know how to do it?
-
Yeah, the last post in the link to the other thread tells you what you need to do, its a pretty simple change but let us know if you have any problems.
-
Cool, thanks.
-
Is there a fix available for this bug? The link doen't work for me.
Or does someone else has a solution for this problem. Otherwise I can also attach a script which detact a mouse down event?
Btw: I am using Version 2.3.3 and the Bug is still present. Thanks in advance!
-
That was fixed in 2.2, and just tested that it works fine in 2.3 too. What are you trying to do here? Can you give me exact steps?
-
Sure.
I have a prefab which contains a button (tk2dUIItem). In the Send Message Target I attached a GameObject which contains a Script. In this Script I have a function and this function is assigned to the Send Message Target. It is saved until I run my Application or editing the prefab or just swich between scenes. Is it possible to save the GameObject (only exist in the Scene) with a prefab? I guess my error occurs because I assigned a GameObject which only exist in the Scene so the prefab is not able to save when switching scenes?
-
You can't have a link to a scene object from a prefab. You can apply it but it won't be remembered.
-
Ok. I thought as much! Thank you for your response!