GetAllRuntimeMonoScripts() 개인적인 메소드

private GetAllRuntimeMonoScripts ( ) : UnityEditor.MonoScript[]
리턴 UnityEditor.MonoScript[]
예제 #1
0
 private void PopulateScriptArray()
 {
     this.m_AllScripts         = MonoImporter.GetAllRuntimeMonoScripts();
     this.m_AllOrders          = new int[this.m_AllScripts.Length];
     this.m_CustomTimeScripts  = new List <MonoScript>();
     this.m_DefaultTimeScripts = new List <MonoScript>();
     for (int i = 0; i < this.m_AllScripts.Length; i++)
     {
         MonoScript script = this.m_AllScripts[i];
         this.m_AllOrders[i] = MonoImporter.GetExecutionOrder(script);
         if (IsValidScript(script))
         {
             if (this.GetExecutionOrder(script) == 0)
             {
                 this.m_DefaultTimeScripts.Add(script);
             }
             else
             {
                 this.m_CustomTimeScripts.Add(script);
             }
         }
     }
     this.m_CustomTimeScripts.Add(sDummyScript);
     this.m_CustomTimeScripts.Add(sDummyScript);
     this.m_CustomTimeScripts.Sort(new SortMonoScriptExecutionOrder(this));
     this.m_DefaultTimeScripts.Sort(new SortMonoScriptNameOrder());
     this.m_Edited      = null;
     this.m_DirtyOrders = false;
 }
 private void PopulateScriptArray()
 {
     this.m_AllScripts         = MonoImporter.GetAllRuntimeMonoScripts();
     this.m_AllOrders          = new int[this.m_AllScripts.Length];
     this.m_CustomTimeScripts  = new List <MonoScript>();
     this.m_DefaultTimeScripts = new List <MonoScript>();
     for (int index = 0; index < this.m_AllScripts.Length; ++index)
     {
         MonoScript allScript = this.m_AllScripts[index];
         this.m_AllOrders[index] = MonoImporter.GetExecutionOrder(allScript);
         if (ScriptExecutionOrderInspector.IsValidScript(allScript))
         {
             if (this.GetExecutionOrder(allScript) == 0)
             {
                 this.m_DefaultTimeScripts.Add(allScript);
             }
             else
             {
                 this.m_CustomTimeScripts.Add(allScript);
             }
         }
     }
     this.m_CustomTimeScripts.Add(ScriptExecutionOrderInspector.sDummyScript);
     this.m_CustomTimeScripts.Add(ScriptExecutionOrderInspector.sDummyScript);
     this.m_CustomTimeScripts.Sort((IComparer <MonoScript>) new ScriptExecutionOrderInspector.SortMonoScriptExecutionOrder(this));
     this.m_DefaultTimeScripts.Sort((IComparer <MonoScript>) new ScriptExecutionOrderInspector.SortMonoScriptNameOrder());
     this.m_Edited      = (MonoScript)null;
     this.m_DirtyOrders = false;
 }
예제 #3
0
        void PopulateScriptArray()
        {
            m_AllScripts = MonoImporter.GetAllRuntimeMonoScripts();
            m_AllOrders  = new int[m_AllScripts.Length];

            // Create cleaned up list of scripts
            m_CustomTimeScripts  = new List <MonoScript>();
            m_DefaultTimeScripts = new List <MonoScript>();
            for (int i = 0; i < m_AllScripts.Length; i++)
            {
                MonoScript script = m_AllScripts[i];
                m_AllOrders[i] = MonoImporter.GetExecutionOrder(script);

                if (!IsValidScript(script))
                {
                    continue;
                }

                if (GetExecutionOrder(script) == 0)
                {
                    m_DefaultTimeScripts.Add(script);
                }
                else
                {
                    m_CustomTimeScripts.Add(script);
                }
            }

            // Add two dummy items used for the default time area
            m_CustomTimeScripts.Add(sDummyScript);
            m_CustomTimeScripts.Add(sDummyScript);

            // Assign and sort
            m_CustomTimeScripts.Sort(new SortMonoScriptExecutionOrder(this));
            m_DefaultTimeScripts.Sort(new SortMonoScriptNameOrder());
            m_Edited = null;

            m_DirtyOrders = false;
        }