Update Stylesheet From Editor

I am trying to grab my uss file from the assets folder using AssetDatabase.LoadAssetAtPath and want to simple change some text inside it using .Replace().

Is this possible?

Not in this way. If you want to manipulate files in disk, you can use standard C# API for that, and then make sure to reimport the asset into Unity. There’s no API for changing USS files on the fly at the moment.

1 Like