Exemple #1
0
            public void Add(IPostProcessingEffect item)
            {
                if (item == null)
                {
                    throw new System.ArgumentNullException("item");
                }
                var obj = ObjUtil.GetAsFromSource <UnityEngine.Object>(item);

                if (obj == null)
                {
                    throw new System.ArgumentException("item must be a UnityEngine.Object", "value");
                }

                _owner._globalEffects.Add(obj);
                _owner.EffectsListChanged();
            }
Exemple #2
0
            private void OnRenderImage(RenderTexture source, RenderTexture destination)
            {
                if (_manager == null)
                {
                    return;
                }

                if (_manager._globalEffects.Count == 0)
                {
                    _manager.EffectsListChanged();
                    return;
                }

                _manager.ApplyGlobalPostProcessing(this, source, destination);
            }