Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.1.0a10
2019.2.0a1
Issue ID
1117928
Regression
Yes
[UI Elements] USS file update doesn't reflect in the editor till Unity is restarted
Changes made to .uss style file do not reflect the changes in the editor till Unity is restarted
Note:
1. Refer attached video
2. Workaround: Compile any C# Script in the project or create a new script (get Unity to recompile).
Steps to reproduce:
1. Create new project > Import attached unitypackage
2. Menu > USS Test > USS
3. Open Assets > Editor > Resources > TR_USS.uss in any editor
4. Change values from 0 to 100 in #blue, #red, #yellow, #green for background-color: rgb property
5. Switch back to Unity
6. Notice that the colours have not changed. Close the window
7. Menu > USS Test > USS
Actual result:
Changes made to the USS file are not reflected in the editor window
Expected result:
Changes made to the USS file are reflected in the editor window without having to restart Unity
Reproduced in:
2019.2.0a1, 2019.1.0a14, 2019.1.0a10
Working fine in:
2019.1.0a09, 2018.3.3f1
Environment:
Windows & Mac
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [URP][Lighting] The skybox doesn't render after changing the settings of the Material when using the URP Render Pipeline
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
Resolution Note (2019.1.X):
Only affects the experimental namespace UIElements which will be removed in 2019.1/2019.2.
Please update your code to the non-experimental API:
using UnityEngine.UIElements;
using UnityEngine.UIElements.StyleSheets;
using UnityEditor.UIElements;
using System;
public class TR_USS : EditorWindow
{
[MenuItem("TestRail/USS")]
public static void ShowExample()
{
TR_USS window = GetWindow<TR_USS>();
window.titleContent = new GUIContent("TR USS");
}
public void OnEnable()
{
String[] squareNames = new String[] { "blue", "red", "green", "yellow" };
VisualElement root = this.rootVisualElement;
root.style.flexDirection = FlexDirection.Row;
root.styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>("Assets/Editor/Resources/TR_USS_Style.uss") as StyleSheet);
[...]
}
}