예제 #1
0
파일: YogaNode.cs 프로젝트: zmjios/yoga
        public void SetMeasureFunction(MeasureFunction measureFunction)
        {
            _measureFunction = measureFunction;
            if (measureFunction != null)
            {
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
                _ygNode.SetContext(this);
#else
                _managedMeasure = MeasureInternal;
#endif
            }
            Native.YGNodeSetMeasureFunc(_ygNode, _managedMeasure);
        }
예제 #2
0
파일: Native.cs 프로젝트: zmjios/yoga
 public static extern void YGNodeSetMeasureFunc(
     YGNodeHandle node,
     [MarshalAs(UnmanagedType.FunctionPtr)] YogaMeasureFunc measureFunc);
예제 #3
0
파일: YogaNode.cs 프로젝트: orta/yoga
 public void SetMeasureFunction(MeasureFunction measureFunction)
 {
     _measureFunction = measureFunction;
     _ygMeasureFunc   = measureFunction != null ? MeasureInternal : (YogaMeasureFunc)null;
     Native.YGNodeSetMeasureFunc(_ygNode, _ygMeasureFunc);
 }