I’m seeing a number of weird things with trying to visually modify markers on the timeline. Am I doing anything wrong trying to customize the timeline visuals? Can anyone give any more information on why things are working this way?
I started working from the example here: GitHub - Unity-Technologies/TimelineMarkerCustomization: Examples to show how markers and notifications work.
I’m using the latest Timeline package with 2022.3.21.
Here’s what I’m seeing:
-
It seems that I have to put any styles in Stylesheets/Extensions/common.uss. If I change any part of that path, I get the error:
Cannot find style X for Y
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
Is that correct? I don’t see that documented anywhere; I only figured it out by starting from Unity’s example and modifying until things broke. -
When I change the common.uss, nothing actually changes until I edit a random script and unity recompiles. Is that expected?
-
It seems like most uss parameters don’t work for marker customization. Here’s my stylesheet, with notes on what’s not working:
/* Hidden (Minimized) State */
DestroyEvent
{
width: 24px;
height: 24px;
/* Loading one of the built-in editor icons works fine */
background-image: resource("d_P4_DeletedLocal");
/* None of these do anything */
border-width: 1px;
border-color: #FF0000;
color: #FF0000;
-unity-background-image-tint-color: rgb(255, 0, 0);
}
/* Normal State */
DestroyEvent:checked
{
/* This works (built-in icon) */
background-image: resource("Cancel");
/* None of these do anything */
border-width: 2px;
border-color: #FF0000;
background-color: rgba(255, 0, 0, 255);
color: #FF0000;
-unity-background-image-tint-color: rgb(255, 0, 0);
/* These don't seem to work - it always uses the size from DestroyEvent at the top */
width: 12px;
height: 12px;
}
/* Selected State */
DestroyEvent:hover:focus:checked
{
/* None of these do anything */
background-image: none;
background-color: rgba(255, 0, 0, 255);
border-width: 1px;
border-color: #FF0000;
color: #FF0000;
-unity-background-image-tint-color: rgba(255, 0, 0, 255);
/* These don't seem to work - it always uses the size from DestroyEvent at the top */
width: 12px;
height: 12px;
}
Am I doing something incorrect here? Does anyone have a working example that allows you to change icon size, colors, borders, etc. in the different states?