Author Topic: Buttons keep forgetting their OnClick delegates set inside editor  (Read 1518 times)

stacktrace

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
I have a project I recently updated to the latest version of NGUI (last week) and now my NGUI buttons keep forgetting their delegates.  So I have set them over again and sometimes they will work for one or two runs, but then I find it unset again (this is all within the same session).

I didn't see any other such complaints on this forum, so perhaps I am just doing something wrong.  The buttons I am setting with the issues are on Prefabs.  I have set the delegates both directly on the Prefab, as well as dragging the prefab into the scene, setting this instance and hitting the "apply" button in the inspector.  The problem continues regardless.

I think I will just end up setting the delegates in code, but wanted to post just in case their is an easy/obvious answer.


I almost didn't want to post at all, as I see how busy these boards are, and how responsive you are.  This is an amazing product, and I am amazed at the amount of energy you continue to put into it.  Thank you for this awesome tool!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Buttons keep forgetting their OnClick delegates set inside editor
« Reply #1 on: February 20, 2014, 09:47:39 AM »
Prefabs can only reference things that are a part of the same prefab. They can't keep references to things outside of the prefab.

Think about it. ;)