Beispiel #1
0
            public string GetDelegateText(UnityEventFloat ue, Func <float, bool> a)
            {
                StringBuilder text = new StringBuilder();

                if (ue != null)
                {
                    for (int i = 0; i < ue.GetPersistentEventCount(); ++i)
                    {
                        if (text.Length > 0)
                        {
                            text.Append("\n");
                        }
                        UnityEngine.Object obj = ue.GetPersistentTarget(i);
                        string             t   = obj != null ? obj.name : "<???>";
                        text.Append(t).Append(".").Append(KBind.EventSet.FilterMethodName(ue.GetPersistentMethodName(i)));
                    }
                }
                if (a != null)
                {
                    Delegate[] delegates = a.GetInvocationList();
                    for (int i = 0; i < delegates.Length; ++i)
                    {
                        if (text.Length > 0)
                        {
                            text.Append("\n");
                        }
                        text.Append(delegates[i].Target).Append(".").Append(delegates[i].Method.Name);
                    }
                }
                return(text.ToString());
            }