Search Issue Tracker

Fixed in 2021.2

Votes

0

Found in

2020.2.0b11

2021.1

2021.1.0a10

Issue ID

1298540

Regression

No

[UI Builder] NullReferenceException errors are thrown on selecting TSS Theme file preset asset

UI Builder

-

NullReferenceException errors thrown continuously on selecting TSS Theme file preset asset.

Steps to repro:
1. Create a new Project.
2. Project Window > Click on "+" > UI Toolkit >
3. TSS Theme File > Create its preset asset.
4. Select newly created preset asset.

Actual Result:
NullReferenceException errors in the console.

Expected Result:
No errors in the console.

Reproducible in:
2021.1.0a9, 2020.2.0f1, 2020.2.0b11.

Note:
-Unable to test on 2020.2.b10 to 2020.2.0a1 due to errors on installing UI builder package.
-TSS file Theme option is not available in 2020.1.1f1

Environment:
Occurring on Windows 10 & Mac 10.15.

Stack trace:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.StyleSheets.ThemeStyleSheetImporterEditor.LoadThemeAssetDefinitionState (UnityEditor.UIElements.StyleSheets.ThemeAssetDefinitionState extraData, System.String assetPath) (at <7ba5bac7360d4ac8a9ebd5b4256fdfe2>:0)
UnityEditor.UIElements.StyleSheets.ThemeStyleSheetImporterEditor.InitializeExtraDataInstance (UnityEngine.Object extraData, System.Int32 targetIndex) (at <7ba5bac7360d4ac8a9ebd5b4256fdfe2>:0)
UnityEditor.AssetImporters.AssetImporterEditor.InternalSetTargets (UnityEngine.Object[] t) (at <a19e86c7bf354115a4c6a5953c0575cb>:0)
UnityEditor.Presets.PresetEditor:OnEnable()

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Preset option has been removed from TSSFile in 2021.2.0a2.374.

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.