public void ScrollViewFocusOn(GameObject go, int index, LuaFunction func) { LoopScrollRect component = go.GetComponent <LoopScrollRect>(); if (component != null) { component.FocusOnByIndex(index, delegate(RectTransform target) { if (func != null) { func.Call(new object[] { target }); func.Dispose(); func = null; } }); } }