コード例 #1
0
 protected void UpdateResolution(ImageDimensionInt res)
 {
     m_resolution     = res;
     m_dimensionRatio = 0;
     if (m_resolution.Width > 0 && m_resolution.Height > 0)
     {
         m_dimensionRatio = m_resolution.CalculateRatio();
     }
 }
 protected void UpdateResolution(ImageDimensionInt res)
 {
     m_resolution     = res;
     m_dimensionRatio = 0;
     CalculateDimensionRatio();
 }
コード例 #3
0
 protected void ResetResolution()
 {
     m_resolution     = new ImageDimensionInt();
     m_dimensionRatio = 0;
 }
コード例 #4
0
//----------------------------------------------------------------------------------------------------------------------

        #region Unity Editor code

#if UNITY_EDITOR
        internal void InitFolderInEditor(string folder, List <WatchedFileInfo> imageFiles, ImageDimensionInt res = new ImageDimensionInt())
        {
            m_folder     = folder;
            m_imageFiles = imageFiles;
            UpdateResolution(res);

            if (null != m_folder && m_folder.StartsWith("Assets"))
            {
                m_timelineDefaultAsset = AssetDatabase.LoadAssetAtPath <UnityEditor.DefaultAsset>(m_folder);
            }
            else
            {
                m_timelineDefaultAsset = null;
            }

            ResetTexture();
            EditorUtility.SetDirty(this);
        }