I have an ExpressionTrack inherits TrackAsset, which has an attribute [TrackClipType(typeof(ExpressionPlayableAsset))].
Since ExpressionPlayableAsset inherits PlayableAsset inherits ScriptableObject, I can create ExpressionPlayableAsset assets in my project, and reuse them by drag it into my ExpressionTrack, there will be a clip linked to my asset file.
It works fine in Unity-2017.4 & Unity-2018.1, but no longer since 2018.2.0. I can’t drag any custom playable asset to tracks in newer version.
So if I use attribute TrackClipType(typeof(CustomPlayableAsset), allowAutoCreate: false) on a custom track, I won’t be able to create clip on the track, neither from an asset file.To me, this track is simply unusable…
And in the Timeline window, if I right click on a clip which reference to a asset file, the last menu shows “Find Source Asset”, it also works fine until 2018.1.3 (maybe later). When I updated my Unity to 2018.1.9, I could only do this on built-in clip types, if I do this on custom clip, this menu item turned grey, just like those non-reference clips.
(But still, I can change my Inspector window into Debug mode, and find a property named “Asset”, it will contains the Object reference)
Did I use it wrong, or is it a bug? I have so many custom PlayableAsset files in my project and I cannot use it in 2018.2 anymore. Is there any way to fix it, or should I revert my Unity to 2018.1?
This is a definitely a bug. I’d strongly recommend submitting a bug through the bug reporter for tracking purposes.
The drag and drop was rebuild for 2018.2, to support the more common workflows of having timeline own and manage the custom playable assets.
For example, the following custom playable assets will now automatically support drag and drop of gameObjects and Materials respectively and create the appropriate assets on the corresponding tracks.
public class MyObjectPlayableAsset : PlayableAsset
{
public ExposedReference<GameObject> sceneObject;
....
}
public class MyAssetPlayableAsset : PlayableAsset
{
public Material material;
....
}
It looks like a bug was introduced for existing PlayableAssets on disk in the process.
I tried to open my project with 2018.1, but seems prefab in 2018.2 has different serialization from 2018.1, all the prefab references turned to red Missing… So open 2018.2 project with old Unity version is not a good choice, maybe I should just wait for the next release.
Just Updated to Unity 2018.2.10f and these errors have reappeared. This literally breaks our game.
I tried opening on 2018.2.8f and the errors are still there though they were not when we went 2018.2.7f to 2018.2.8f
I’m pretty sure this exactly the same problem as mentioned in the original post as it is only the plugins that have drag and drop functionality that are broken in our project. The error that appears are:
And I get this message when I click on the broken plugin component in the timeline:
“No Script asset for SetQuestStateClip. Check that the definition is in a file of the same name” "
That error appears when the PlayableAsset derived class doesn’t have a filename that matches. This is a limitation of scriptable objects in Unity. Any chance your SetQuestStateClip is not in a file called SetQuestStateClip.cs?
The other class names match filenames, too: QuestStateMixerBehaviour, QuestStateTrack, SetQuestStateBehaviour.
However, there is one thing that I’ve submitted a bug report on. In Unity 2017+, the inspector for several scripts, including this one, show:
However, the file is otherwise fine, it compiles, and Unity 5.x’s inspector shows it just fine. The problem is the copyright “(c)” character. I’ll be removing that character from scripts in the next release of this asset.
Have you tried removing that copyright? I ask because I think the problems are related to the script compilation. I’ve been trying to repro the issue locally without success.
If you have a repro case I could try that would help. Feel free to post it, or DM it to me.
I’ve asked @nathanjams to test this. I haven’t been able to reproduce it, but there may be differences in the way he’s set up his timelines versus my tests.
Hey guys, thanks for the replies. Changing the copyright didn’t fix the issue unfortunately for the broken build.
I had made a duplicate of a working version of our project last night (working on Unity 2018.2.8) and changed the copyright in the code before opening the project in Unity 2018.2.10 and there were no errors.
I will make another copy tonight of that same version to see if not making those changes to the copyright have any effect.
There is a wildcard here is we have started using a SVN system here in the last two weeks so perhaps something in that process is breaking something.
Unfortunately I can’t share the project because it is almost 100 gigs
I will post tomorrow with an update.
Thanks for your time with this.
Hey again, @TonyLi and @seant_unity
So I found the culprit but it makes no sense to me. Maybe one of you can explain.
Tony’s suggestion to remove the copyright icon got me looking at the headers of the scripts so I tried removing the encapsulating condition: #if Unity2017_1_OR_Newer && !(UNITY_2017_3 && UNITY_WSA) and my issues were fixed.
This doesn’t make any sense because we are running Unity 2018.2.10 and this issue has been popping up throughout the 2018.2.x release.
During the 2018.2.4 and 2018.2.5 releases (i believe) rebuilding the library would break our Dialogue System plugins. Then with the 2018.2.7 release we could rebuild the library without issue.
I’m not sure why the use of SVN would break this again but somehow the project files or settings are not liking that condition.
Anyways, I’ll post more if I figure anything else. Thanks again for your time.