Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

UnityEditor.Timeline not found

Discussion in 'Timeline' started by IN_Ron, Jul 11, 2018.

  1. IN_Ron

    IN_Ron

    Joined:
    Feb 21, 2018
    Posts:
    23
    Hi,

    I'm trying to move a project from 2017.3 to 2018.2 and I'm having an issue with some scripts using UnityEditor.Timeline: The type or namespace name `Timeline' does not exist in the namespace `UnityEditor'. Looking at the documentation though (https://docs.unity3d.com/ScriptReference/Timeline.TimelineEditor.html) it should be there (although strangely enough it wasn't in 2018.1, but was in 2017.3).

    What's going on here? Is anybody else having this issue or am I just doing something stupid (very possible)? If that namespace no longer exists, where would I find the functionality it provided (e.g. the currently being shown Asset and Director)?

    Cheers,
    Ron
     
  2. julienb

    julienb

    Unity Technologies

    Joined:
    Sep 9, 2016
    Posts:
    174
    I just tried upgrading a test project using TimelineEditor from 2017.3 to 2018.2 and I didn't have any compilation issues. Is your script in an Editor folder? See this page, section Editor; scripts that use the UnityEditor namespace need to be in a special folder.
     
    IN_Ron likes this.
  3. IN_Ron

    IN_Ron

    Joined:
    Feb 21, 2018
    Posts:
    23
    Hi Julien, thanks for getting back to me. You are right, the problem seems to be that these scripts are not in an Editor folder. This must be a new requirement (compared to 2017.3) as it was not an issue before (the scripts are implementing runtime code with some additional editor functionality guarded with an UNITY-EDITOR define).

    Anyway, thanks for the pointer, I can now refactor the code to make it work again.
     
    julienb likes this.