private static int GetDefaultExecutionOrderFor(Type klass)
        {
            DefaultExecutionOrder customAttributeOfType = AttributeHelperEngine.GetCustomAttributeOfType <DefaultExecutionOrder>(klass);
            int result;

            if (customAttributeOfType == null)
            {
                result = 0;
            }
            else
            {
                result = customAttributeOfType.order;
            }
            return(result);
        }
예제 #2
0
        private static int CheckIsEditorScript(Type klass)
        {
            int result;

            while (klass != null && klass != typeof(MonoBehaviour))
            {
                int  executeMode = AttributeHelperEngine.GetExecuteMode(klass);
                bool flag        = executeMode > 0;
                if (flag)
                {
                    result = executeMode;
                    return(result);
                }
                klass = klass.BaseType;
            }
            result = 0;
            return(result);
        }