lib_unity_purchase/Editor/ServiceProjectSettings/Presenter/SettingsUIUtils.cs

20 lines
463 B
C#

using System;
using UnityEngine.UIElements;
namespace UnityEditor.Purchasing
{
static class SettingsUIUtils
{
public static VisualElement CloneUIFromTemplate(string templatePath)
{
var template = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(templatePath);
if (template == null)
{
return null;
}
return template.CloneTree().contentContainer;
}
}
}