Skip to content

Commit

Permalink
fix: crash caused by g_ThreadedGfxDevice after deserialization (#60)
Browse files Browse the repository at this point in the history
* Fix crash caused by performing graphics operation when g_ThreadedGfxDevice is not ready after deserialization.
* Update package version
  • Loading branch information
sindharta authored Apr 15, 2020
1 parent 4979939 commit 24e7ecb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [0.1.3-preview] - 2020-04-15
* fix: crash caused by performing graphics operation when g_ThreadedGfxDevice is not ready after deserialization

## [0.1.2-preview] - 2020-04-14
* fix: errors caused by StreamingImageSequenceTrack::GetActivePlayableAsset() when TimelineWindow is not in focus
* fix: keep processing StreamingImageSequencePlayableAsset even if there is no bound GameObject in the track, as the output texture is still required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace UnityEngine.StreamingImageSequence {
/// </summary>
[System.Serializable]
public class StreamingImageSequencePlayableAsset : PlayableAsset, ITimelineClipAsset
, IPlayableBehaviour, ISerializationCallbackReceiver
, IPlayableBehaviour
{
//----------------------------------------------------------------------------------------------------------------------
#region IPlayableBehaviour interfaces
Expand Down Expand Up @@ -236,6 +236,8 @@ internal int LocalTimeToImageIndex(double localTime) {

internal int GetVersion() { return m_version; }
internal IList<string> GetImagePaths() { return m_imagePaths; }

//May return uninitialized value during initialization because the resolution hasn't been updated
internal ImageDimensionInt GetResolution() { return m_resolution; }
internal System.Collections.IList GetImagePathsNonGeneric() { return m_imagePaths; }
internal TimelineClip GetTimelineClip() { return m_timelineClip; }
Expand Down Expand Up @@ -637,20 +639,6 @@ void ForceUpdateResolution() {
internal void OnAfterTrackDeserialize(TimelineClip clip) {
SetTimelineClip(clip);
}

//----------------------------------------------------------------------------------------------------------------------

#region ISerializationCallbackReceiver implementation
/// <inheritdoc/>
public void OnBeforeSerialize() {
}

/// <inheritdoc/>
public void OnAfterDeserialize() {
ForceUpdateResolution();
}
#endregion


//----------------------------------------------------------------------------------------------------------------------
internal void ResetAnimationCurve() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"displayName": "Streaming Image Sequence",
"name": "com.unity.streaming-image-sequence",
"unity": "2019.2",
"version": "0.1.2-preview",
"version": "0.1.3-preview",
"dependencies": {
"com.unity.timeline": "1.2.14"
},
Expand Down

0 comments on commit 24e7ecb

Please sign in to comment.