Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to preview spawned VFX Prefab in timeline?

Discussion in 'Timeline' started by Sangemdoko, Jun 1, 2022.

  1. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Hi,

    I'm using timeline to make some cinematics.
    In my timeline I spawn a few things during preview, for example my player character. This is done through custom tracks and clips.

    Now I would like to add some VFX to my character when it attacks. Instead of having the VFX in the scene I would like to spawn it as a child of the character weapon while I preview the timeline.
    I want to spawn it in the timeline to keep the character prefab clean instead of having all possible VFX in the character hierarchy.

    So far that works fine with my custom tracks and clips, I can spawn/destroy my VFX prefab wherever I want. The issue I have is that I can't seem to find the way to preview my vfx in the timeline once it is spawned.

    The VFX is split in multiple children but I'd like to preview everything.

    Is the only way to preview a particle VFX (shuriken) to use the Control track?
     
  2. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    220
    Turns out the Control Track/clips allows you to spawn prefabs out of the box. And they are previewable (need to tick control children in the inspector)

    So I guess I'll go through the source code and see if I can make some custom clips for the control Track, or make my own custom control Track. I'll need it to get the parent transform dynamically considering my player is spawned in preview. Plus its always nice to have some extra control with offsets, etc...
     
    akent99 likes this.