Beispiel #1
0
        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);
        }
Beispiel #2
0
 public static extern void YGNodeSetMeasureFunc(
     YGNodeHandle node,
     [MarshalAs(UnmanagedType.FunctionPtr)] YogaMeasureFunc measureFunc);
Beispiel #3
0
 public void SetMeasureFunction(MeasureFunction measureFunction)
 {
     _measureFunction = measureFunction;
     _ygMeasureFunc   = measureFunction != null ? MeasureInternal : (YogaMeasureFunc)null;
     Native.YGNodeSetMeasureFunc(_ygNode, _ygMeasureFunc);
 }