Custom Timeline Behaviour - GameObject can only be selected from Project Folder - not from Scene.

I created a custom Behaviour and I added a GameObject Field to it.

using UnityEngine;
using UnityEngine.Playables;
public class LocalizedDialogTimeline : PlayableAsset
{
    public string dialogId;
    public GameObject gameObject;


    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        var scriptPlayable = ScriptPlayable<LocalizedDialogTimelineBehaviour>.Create(graph);
        var localizedDialogTimelineBehaviour = scriptPlayable.GetBehaviour();
        localizedDialogTimelineBehaviour.dialogId = dialogId;
        localizedDialogTimelineBehaviour.gameObject = gameObject;
        return scriptPlayable;
    }    
}

#########

using TMPro;
using UnityEngine;
using UnityEngine.Playables;
public class LocalizedDialogTimelineBehaviour : PlayableBehaviour
{
    public string dialogId;
    public GameObject gameObject;
}

So you should be able to enter an Id (which works like charm) and you should be able to select a GameObject. I cannot select GameObjects from the Scene. I can only select assets from my Asset folder.

I’m kinda confused why this happens. How can I select a scene GameObject in a custom timeline behaviour?

An asset cannot reference a gameObject that exists in a scene. To get around this Timeline uses exposed references.