//---------------------------------------------------------------------------------------------------------------------- //Wrappers so that the code to decide the currentFrame is gathered in one place internal static void GetImageDataInto(string fileName, int imageType, out ImageData readResult) { StreamingImageSequencePlugin.GetImageDataInto(fileName, imageType, GetCurrentFrame(), out readResult); //Display not enough memory warning. switch (readResult.ReadStatus) { case StreamingImageSequenceConstants.READ_STATUS_OUT_OF_MEMORY: { if (m_showWarningOnOOM) { Debug.LogWarning("[SIS] Out of memory when loading images"); m_showWarningOnOOM = false; } break; } case StreamingImageSequenceConstants.READ_STATUS_SUCCESS: { m_showWarningOnOOM = true; break; } default: { break; }; } }
//---------------------------------------------------------------------------------------------------------------------- private void UnloadImage(int index) { Assert.IsTrue(index < m_imageFiles.Count); string imagePath = PathUtility.GetPath(m_folder, m_imageFiles[index].GetName()); StreamingImageSequencePlugin.UnloadImageAndNotify(imagePath); }
internal static void ResetImageLoading() { ThreadManager.Reset(); StreamingImageSequencePlugin.ResetPlugin(); foreach (IUpdateTask job in m_mainThreadPeriodJobs) { job.Reset(); } }
static void ImageLoader_PlayModeStateChanged(PlayModeStateChange state) { if (PlayModeStateChange.EnteredEditMode != state) { return; } InitImageLoaderInEditor(); StreamingImageSequencePlugin.ResetImageLoadOrder(); }
//---------------------------------------------------------------------------------------------------------------------- public override void Execute() { string imagePath = GetImagePath(); int requestFrame = GetRequestFrame(); #if DEBUG_FULL_IMAGE const int IMAGE_TYPE = StreamingImageSequenceConstants.IMAGE_TYPE_FULL; StreamingImageSequencePlugin.GetImageDataInto(imagePath, IMAGE_TYPE, requestFrame, out ImageData imageData); Assert.AreNotEqual(StreamingImageSequenceConstants.READ_STATUS_LOADING, imageData.ReadStatus); Assert.AreNotEqual(StreamingImageSequenceConstants.READ_STATUS_SUCCESS, imageData.ReadStatus); #endif StreamingImageSequencePlugin.LoadAndAllocFullImage(imagePath, requestFrame); }
//---------------------------------------------------------------------------------------------------------------------- public override void Execute() { string imagePath = GetImagePath(); int requestFrame = GetRequestFrame(); #if DEBUG_PREVIEW_IMAGE const int TEX_TYPE = StreamingImageSequenceConstants.IMAGE_TYPE_PREVIEW; StreamingImageSequencePlugin.GetImageDataInto(imagePath, TEX_TYPE, requestFrame, out ImageData imageData); Assert.AreNotEqual(StreamingImageSequenceConstants.READ_STATUS_LOADING, imageData.ReadStatus); Assert.AreNotEqual(StreamingImageSequenceConstants.READ_STATUS_SUCCESS, imageData.ReadStatus); #endif StreamingImageSequencePlugin.LoadAndAllocPreviewImage(imagePath, m_width, m_height, requestFrame); }
//---------------------------------------------------------------------------------------------------------------------- //Wrappers so that the code to decide the currentFrame is gathered in one place internal static void GetImageDataInto(string fileName, int imageType, out ImageData readResult) { StreamingImageSequencePlugin.GetImageDataInto(fileName, imageType, GetCurrentFrame(), out readResult); }
internal static void ImageLoaderOnRuntimeLoad() { StreamingImageSequencePlugin.ResetImageLoadOrder(); }