FairyGUI.EMRenderSupport.Add C# (CSharp) Method

Add() public static method

public static Add ( EMRenderTarget value ) : void
value EMRenderTarget
return void
        public static void Add(EMRenderTarget value)
        {
            if (!_targets.Contains(value))
                _targets.Add(value);
            orderChanged = true;
        }

Usage Example

Example #1
0
        void OnEnable()
        {
            if (Application.isPlaying)
            {
                CreateContainer();

                if (!string.IsNullOrEmpty(packagePath) && UIPackage.GetByName(packageName) == null)
                {
                    UIPackage.AddPackage(packagePath);
                }
            }
            else
            {
                //不在播放状态时我们不在OnEnable创建,因为Prefab也会调用OnEnable,延迟到Update里创建(Prefab不调用Update)
                //每次播放前都会disable/enable一次。。。
                if (container != null)                //如果不为null,可能是因为Prefab revert, 而不是因为Assembly reload,
                {
                    OnDestroy();
                }

                EMRenderSupport.Add(this);
                screenSizeVer     = 0;
                uiBounds.position = position;
                uiBounds.size     = cachedUISize;
                if (uiBounds.size == Vector2.zero)
                {
                    uiBounds.size = new Vector2(30, 30);
                }
            }
        }
All Usage Examples Of FairyGUI.EMRenderSupport::Add