- Home /
Timeline Marker copy/paste behavior with exposed references.
I've created a simple custom timeline marker that has an ExposedReference to get a transform in the scene. The associated custom listener spawns enemies at that transform's position.
Everything works as expected when creating a new marker via right-click option in timeline. However, if I copy/paste or duplicate the marker, the exposedReference is "shared" between all markers created this way. So if I change the transform on either the original or any of the copies, all of the others will also change to that transform.
The non-exposedReference properties of the marker do not show this behaviour. Is this a bug or have I perhaps missed a setting somewhere? Code snip below:
[Serializable, DisplayName("Spawn Marker")]
public class SpawnMarker : Marker, INotification, INotificationOptionProvider
{
public bool spawnSpecific;
public ExposedReference<Transform> spawnPoint;
public bool retroactive;
public bool emitOnce;
PropertyName INotification.id{get{return new PropertyName();}}
NotificationFlags INotificationOptionProvider.flags
{
get{
return (retroactive ? NotificationFlags.Retroactive : default(NotificationFlags)) |
(emitOnce ? NotificationFlags.TriggerOnce : default(NotificationFlags));
}
}
}
Comment