示例#1
0
        /// <summary>
        /// Validate the panel transform.
        /// </summary>
        protected virtual void Validate()
        {
            m_ShouldWarnWorldTransformMissing = true;
            if (panelTransform != null && panelTransform is IPanelTransform)
            {
                m_PanelTransform = panelTransform as IPanelTransform;
            }

#if UNITY_EDITOR
            m_UxmlAssetPath = uxml ? AssetDatabase.GetAssetPath(uxml) : null;

            if (m_OldEnableLiveUpdate != m_EnableLiveUpdate)
            {
                if (m_EnableLiveUpdate)
                {
                    RecreateUIFromUxml();
                    StartWatchingFiles();
                }
                else
                {
                    StopWatchingFiles();
                }
                m_OldEnableLiveUpdate = m_EnableLiveUpdate;
            }
#endif
        }
示例#2
0
 void OnValidate()
 {
     m_ShouldWarnWorldTransformMissing = true;
     if (panelTransform != null && panelTransform is IPanelTransform)
     {
         m_PanelTransform = panelTransform as IPanelTransform;
     }
 }