Esempio n. 1
0
//----------------------------------------------------------------------------------------------------------------------

        //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;
            };
            }
        }
Esempio n. 2
0
//----------------------------------------------------------------------------------------------------------------------
        private void UnloadImage(int index)
        {
            Assert.IsTrue(index < m_imageFiles.Count);
            string imagePath = PathUtility.GetPath(m_folder, m_imageFiles[index].GetName());

            StreamingImageSequencePlugin.UnloadImageAndNotify(imagePath);
        }
Esempio n. 3
0
 internal static void ResetImageLoading()
 {
     ThreadManager.Reset();
     StreamingImageSequencePlugin.ResetPlugin();
     foreach (IUpdateTask job in m_mainThreadPeriodJobs)
     {
         job.Reset();
     }
 }
Esempio n. 4
0
        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);
        }
Esempio n. 7
0
//----------------------------------------------------------------------------------------------------------------------

        //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);
        }
Esempio n. 8
0
 internal static void ImageLoaderOnRuntimeLoad()
 {
     StreamingImageSequencePlugin.ResetImageLoadOrder();
 }