Skip to content

Commit

Permalink
Fixed deep link for unity package
Browse files Browse the repository at this point in the history
  • Loading branch information
voropserg committed Oct 17, 2022
1 parent 446cbc8 commit 9a215b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Editor/CreateDeepLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@ public void OnEnable()

// Import UXML
var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Packages/com.totem.totemcore/Editor/CreateDeepLink.uxml");
if (visualTree == null)
{
visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/Plugins/TotemGeneratorUnity/Editor/CreateDeepLink.uxml");
}
VisualElement labelFromUXML = visualTree.CloneTree();
root.Add(labelFromUXML);

var styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>("Packages/com.totem.totemcore/Editor/CreateDeepLink.uss");
if (styleSheet == null)
{
styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>("Assets/Plugins/TotemGeneratorUnity/Editor/CreateDeepLink.uss");
}
root.styleSheets.Add(styleSheet);

generateButton = root.Q<Button>("generateButton");
Expand Down

0 comments on commit 9a215b2

Please sign in to comment.