Flexgrow not working, an addendum

Heya,

Thanks for the updates re: flexgrow. Being completely ignorant, I wasn’t sure how to implement the code that was discussed.

However, after reqatching the vids, understanding things a little better and doing a tad bit of research, I updated my code from the lecture to be:



            VisualTreeAsset original = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(path + "TaskListEditor.uxml");

            TemplateContainer templateContainer = original.Instantiate();
            templateContainer.style.flexGrow = 1f;

            container.Add(templateContainer);

Privacy & Terms