Each track needs to know in which type of group it is allowed to be added. (Thus an Animator Track can’t be added on the global, Director group).
If you are also going to create custom tracks, you can of course create a base track class and only add the attribute in the base class.
If the group is supposed to use the existing tracks like for example ActorActionTrack, then you will need to add the attribute to the ActorActionTrack as well, even though this means that the original source code needs to be changed which is not advisable easier updating.
To be honest Groups were never really meant to be expanded, but rather only tracks and action clips.
May I ask the reason for a custom Group? Is it something that could be implemented officially?
I want the group actor is A or B or C, so I need to craete actor by some define ID instead of using prefab for my work
It like this
void OnStart()
{
if (ID == 1) actor = GameObject.Instantiate(A_Prefab);
else if (ID == 2) actor = GameObject.Instantiate(B_Prefab);
else if (ID == 3) actor = GameObject.Instantiate(C_Prefab);
}
Instead of creating a custom group, you can dynamically change the target actor through code and in runtime, before starting the cutscene.
You just have to give the Actor Group a name in the inspector and then in code call cutscene.SetGroupActorOfName(“MyActor”, newActor);
For example: