コード例 #1
0
ファイル: BGJobCacheChecker.cs プロジェクト: cwp10/MovieProxy
        //       public GUIStyle m_style;
        public BGJobCacheParam(MovieProxyPlayableAsset asset)
        {
            m_asset       = asset;
            m_collorArray = new UInt32[m_asset.Pictures.Length];

            m_tex2D     = new Texture2D(m_asset.Pictures.Length, 1);
            m_allLoaded = false;
            //           m_style = new GUIStyle(GUI.skin.box);
        }
コード例 #2
0
ファイル: EditorPeriodicJob.cs プロジェクト: cwp10/MovieProxy
        private static void ProcessMovieProxyTrack(MovieProxyTrack track)
        {
            foreach (var clip in track.GetClips())
            {
                // You might want to use "as" rather than compare type.
                // "as" sometimes fail on first importing time for project.
                if (clip.asset.GetType() != typeof(MovieProxyPlayableAsset))
                {
                    Debug.LogError("MovieProxyPlayableAsset is broken:" + clip.asset.name);
                    continue;
                }

                /*
                 * if (clip.asset == null)
                 * {
                 *  Debug.LogError("MovieProxyPlayableAsset on " + clip.displayName + " is broken.");
                 *  continue;
                 * }*/

                MovieProxyPlayableAsset asset = (MovieProxyPlayableAsset)clip.asset;
                int length = asset.Pictures.Length;
                if (m_MovieProxyPlayableAssetToColorArray.ContainsKey(asset))
                {
                }
                else
                {
                    m_MovieProxyPlayableAssetToColorArray.Add(asset, new BGJobCacheParam(asset));
                }
                var param        = m_MovieProxyPlayableAssetToColorArray[asset];
                int allAreLoaded = PluginUtil.GetAllAreLoaded(asset.GetInstanceID());

                if (allAreLoaded == 0)
                {
                    new BGJobCacheChecker(m_MovieProxyPlayableAssetToColorArray[asset]);
                    UInt32[] colorArray = m_MovieProxyPlayableAssetToColorArray[asset].m_collorArray;
                    if (colorArray == null)
                    {
                        return;
                    }
                    PluginUtil.SetOverwrapWindowData(asset.GetInstanceID(), colorArray, colorArray.Length);
                    if (param.m_allLoaded)
                    {
                        PluginUtil.SetAllAreLoaded(asset.GetInstanceID(), 1);
                    }
                }
                else
                {
                    PluginUtil.HideOverwrapWindow(asset.GetInstanceID());
                }
            }
        }