Skip to content

Commit

Permalink
Fix addressable browser compat with older unity versions
Browse files Browse the repository at this point in the history
  • Loading branch information
PassivePicasso committed Jan 7, 2024
1 parent 089134a commit f6043e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Editor/Core/UIElements/UIElementsPolyfill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ public override UnityEngine.UIElements.VisualElement Create(IUxmlAttributes bag,
var foundSrc = bag.TryGetAttributeValue("src", out var src);
if (foundSrc)
{
if (src.StartsWith("Assets") || src.StartsWith("Packages") || src.StartsWith("/Assets") || src.StartsWith("/Packages"))
if (src.StartsWith("project://")) return fakeStyleElement;
else if (src.StartsWith("Assets") || src.StartsWith("Packages") || src.StartsWith("/Assets") || src.StartsWith("/Packages"))
{
#if UNITY_2018
cc.target.AddStyleSheetPath(src.TrimStart('/'));
Expand Down
4 changes: 2 additions & 2 deletions UXML/Addressables/AddressableBrowser.uxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" editor-extension-mode="False">
<Style src="project://database/Packages/com.passivepicasso.thunderkit/USS/thunderkit_style.uss?fileID=11400000&amp;guid=86da9f326fefe10499f1209fcd25e78d&amp;type=3#thunderkit_style" />
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<Style src="/Packages/com.passivepicasso.thunderkit/USS/thunderkit_style.uss" />
<ui:VisualElement class="grow">
<ui:VisualElement class="toolbar">
<ui:VisualElement class="search-toolbar">
Expand Down

0 comments on commit f6043e1

Please sign in to comment.