Control Children property of ControlPlayableAsset does not apply to ITimeControl

Hi,

the current documentation for the ‘Control Children’ property in the ‘Control Track’ settings reads as follows:

“Enable this property if the Source Game Object has a child GameObject with either a Playable Director, Particle System, or ITimeControl Script, and you want the Control clip to control this child component.”

According to the documentation, children of the Source Game Object with ITimeControl scripts should not be controlled by the track as long as this property is disabled.

This does not seem to be the case and the source code appears to completely ignore this property in regards to ITimeControl scripts.

The ‘searchHierarchy’ flag is checked when collecting particle systems:

IList<ParticleSystem> GetControllableParticleSystems(GameObject go)
{
    var roots = new List<ParticleSystem>();

    if (searchHierarchy || go.GetComponent<ParticleSystem>() != null)
    {
        GetControllableParticleSystems(go.transform, roots, s_SubEmitterCollector);
        s_SubEmitterCollector.Clear();
    }

    return roots;
}

The code for ITimeControl scripts never checks this property:

internal static IEnumerable<MonoBehaviour> GetControlableScripts(GameObject root)
{
    if (root == null)
        yield break;

    foreach (var script in root.GetComponentsInChildren<MonoBehaviour>())
    {
        if (script is ITimeControl)
            yield return script;
    }
}

Thanks for putting the work in to discover this issue. I’ll ask one of the Timeline devs about this. I might have misunderstood something when I wrote this paragraph.

I’m currently working on a new version of the Timeline documentation. I will make sure this is corrected in the new documentation. Thanks again for finding this.

It turns out that the documentation is correct and this is actually a Timeline bug. An internal ticket has been created and sent to our Timeline devs.

Thank you, that’s nice to hear. I suppose I need to implement a workaround for the time being.