Search Issue Tracker

Fixed in 1.0.0-preview.7

Votes

0

Found in [Package]

preview - 0.11.0

Issue ID

1256951

Regression

No

[UI Builder] Can't create or add existing StyleSheet in Embedded Package

Package: UI Builder

-

Reproduction steps:
1. Open the attached project "EmbeddedPackgedUiBuilder.zip"
2. Open the UI Builder window
3. Press the "Add" button on the top left side of UI Builder window to create a StyleSheet
4. Go to "Packages/MyPackage/Editor/MyStyleSheets/"
5. Name the file "MyAwesomeStyleSheet"
6. Press "Save"
7. Popup dialogue with the text: "Asset at path {ussPath} is not a StyleSheet" appears
8. Going to your save location shows that the file was created, but is not able to load it

Expected result: created StyleSheet is loaded from the Embedded Package
Actual result: created StyleSheet is not loaded from the Embedded Package (See attached "EmbeddedPackage.mp4")

Reproduces on: UI Builder - preview 0.11.0 (2019.3.16f1), UI Builder preview.1 - 1.0.0 (2020.2.0a17)
Could not test UI Builder preview - 0.10.2 and below due to errors in the console
Could not test 2018.4 (No package)

Notes:
-Issue does not reproduce if a random existing, not built-in package is made into an embedded package
-Printing all AssetDatabase.GetAllAssetPaths() shows that the file does exist, but none of the Load-methods are able to load the StyleSheet.

  1. Resolution Note (fix version 1.0.0-preview.7):

    The project attached has the package folder name incorrectly set. The folder name for the package in the Packages folder has to be the same as the official package name (ie. com.unity.something). If this is not the case, the AssetDatabase APIs do not work. That's why the UI Builder was not able to open any asset inside the example package attached.

    However, in the UI Builder package version 1.0.0-preview.7, I added a little more detail to the error message to account for this kind of problem and to hopefully avoid this problem in the future.

    Note, I verified that changing the Package folder name made the problem go away, even on older versions of UI Builder.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.