{ Adrian.Matías Quezada }

Senior Software Engineer at PrimerLearning

UnityC#BashSelf-directedAutonomous workingInitiativeRemote work

The Primer Learning YouTube channel required assistance in adapting the Unity Game Engine for video production. Our collaboration involved identifying and addressing key challenges, followed by the design and development of tools to resolve these issues effectively.

Our final solution allowed for the programmatic definition of tween sequences. It seamlessly integrated with Unity Timeline, enabling real-time video preview during production, with the ability to scrub backward and forward as needed.

Additionally, we introduced the concept of the "Gnome," a class that dynamically enabled and disabled GameObjects as the timeline was navigated. It also created GameObjects when necessary, optimizing resource utilization.

After our work, defining a scene became as straightforward as the following C# code example:

class Scene1 : Sequence
{
  protected override IEnumerable<Tween> Define()
  {
    using var myBlob = new Gnome<Blob>("My blob");
    myBlob.SetScale(0);

    // This becomes a timeline clip
    yield return myBlob.ScaleTo(1);

    // Another timeline clip
    yield return myBlob.MoveTo(x: 10, y: 10);

    // Two tweens on the same clip
    yield return Parallel(
      myBlob.ScaleTo(0),
      myBlob.MoveTo(x: 0, y: 0)
    );

    // "using" instruction calls myBlob.Dispose() which disables the GameObject
  }
}