Example #1
0
        /// <summary>
        /// 添加“虚影”
        /// </summary>
        public ShadowController AddShadow()
        {
            if (ShadowController == null)
            {
                ShadowController = OperaObject.GetComponent <ShadowController>() ?? OperaObject.AddComponent <ShadowController>();
            }

            ShadowController.hideFlags = HideFlags.HideInInspector;
            return(ShadowController);
        }
Example #2
0
        /// <summary>
        /// 标签显示面板
        /// </summary>
        private void InspectorShadow()
        {
            if (features.ActiveShadow)
            {
                _shadowController            = features.AddShadow();
                _shadowController.shadowType = (ShadowType)EditorGUILayout.EnumPopup("    ·虚影类型:", _shadowController.shadowType);
                if (_shadowController.shadowType == ShadowType.Manual)
                {
                    _shadowController.traModelNode = EditorGUILayout.ObjectField("    ·虚影模型:", _shadowController.traModelNode, typeof(Transform), true) as Transform;
                }

                _shadowController.renderQueue = EditorGUILayout.IntField("    ·Shader渲染层级:", _shadowController.renderQueue);
            }
            else
            {
                features.RemoveShadow();
                _shadowController = null;
            }
        }