Difference between Forward, and direct usage from dll

Hi, need some guidance on forwarding:

Here we see two nodes, that are implemented same way, to the left is forwarded node, to the right is node directly used from dll. Straight a way you can notice that forwarded node is mutable, and has some sort of category.

Same code snippet used in both cases (with own params, but exactly same):

    public static partial class YogaStyle
    {
        public record struct TestStruct(IYogaStyle Style, float Test) : IYogaStyle
        {
            public void ApplyStyle(YogaNode node)
            {
                Style.ApplyStyle(node);
            }
        }

        public static IYogaStyle SetTest(IYogaStyle style, float test) => new TestStruct(style, test);
    }

And a question is:

What should i do to have forwarded node behave same as one from dll?

  • When you create a Forward you can define whether the forward is mutable or not


    This is explained in greater details in the Gray Book here

  • When you right click/configure an Operation you can define those:

2 Likes