Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by TimeForToast · May 06, 2021 at 12:23 PM · editorbug-perhapstimelineplaymodebug report

Bug?: Functionality regarding timeline doesn't work if the timeline is not present in the editor

Hello everyone!

I've made a short video displaying my issue/potential bug.

https://youtu.be/uU6M8qhZUrg

I'm having quite some issues regarding what I think to be a bug in Unity. Whenever enter playmode with the timeline present in my editor, everything works fine, but when I enter playmode without the Timeline present in any of my editor windows (or if i'm in maximize on play), any functionality regarding the green timeline track clips specifically fails to be executed. If I open the timeline during playtime, all functionality is restored. The big issue is though is that in my build the same issue occurs. The green timeline track is one generated in a script. It generates one of those preview clips (the blue or yellow semi-circles) for every yellow clip present on the timeline. Considering it's only the functionality of the green track that is affected, it probably has to do something with fact that I generate that track, but then that still wouldn't be able to explain why it works fine only when the timeline is present in the editor.

Here is where I generate the track. This function is called in the awake function.

 private void CreatePreviewTrack()
     {
         var rootTracks = timeline.GetRootTracks();
 
         foreach (var track in rootTracks)
         {
             if (track is NoteControlTrack)
             {
                 var trackClips = track.GetClips();
                 foreach (var clip in trackClips)
                 {
                     NoteControlClip noteControlClip = clip.asset as NoteControlClip;
 
                     previewNotes.Add(new NotePreviewData(clip.start - previewDuration, previewDuration, noteControlClip.noteType));
                 }
             }
 
         }
 
         previewTrack = timeline.CreateTrack<NotePreviewTrack>();
         timeLineObj.SetGenericBinding(previewTrack, this.gameObject);
 
         foreach (NotePreviewData clipData in previewNotes)
         {
             TimelineClip clip = previewTrack.CreateClip<NotePreviewClip>();
             NotePreviewClip notePreviewClip = clip.asset as NotePreviewClip;
             clip.start = clipData.startTime;
             clip.duration = clipData.duration;
             notePreviewClip.noteType = clipData.type;
         }
         TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved);
     }

And here is what the timeclips are supposed to do:

 public class NotePreviewBehaviour : PlayableBehaviour
 {
     public NoteType type;
 
     public override void OnBehaviourPlay(Playable playable, FrameData info)
     {
         NotePreview.Instance.InstantiateNotePreview(type);
         Debug.Log(type);
         base.OnBehaviourPlay(playable, info);
     }
 }

It could be that I'm just doing something drastically wrong regarding working with the timeline, this is the first time i ever attempted something like this. Any help would be greatly appreciated!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by DavidGeoffroy · May 06, 2021 at 01:35 PM

There's nothing wrong that I can see in the code you posted, but there may be something else in the rest of the code.

Please submit a bug report containing a scene that reproduces your issue, and we will look at it promptly.

You can use the bug reporter to report your bug.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

205 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can't enter Play mode with DOTS package enabled. 0 Answers

My camera is stuck at a weird angle when hitting play. 0 Answers

Play mode enters full screen/ cant exit? 1 Answer

Models used for Hand Presence in UnityXR pop out of existence when close to the camera 0 Answers

(Android) Unity crashes on building process 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges