void OnEnable() { // Get the target _target = (LightShaft)target; // Register editor update method EditorApplication.update += OnEditorUpdate; }
/// <summary> /// Initializes a new instance of the <see cref="YebisPlugin"/> class. /// </summary> /// <param name="name">The name.</param> public YebisPlugin(string name) : base(name) { yebis = new Manager(); ToneMap = yebis.Config.ToneMap; Glare = yebis.Config.Glare; ColorCorrection = yebis.Config.ColorCorrection; Lens = yebis.Config.Lens; DepthOfField = yebis.Config.DepthOfField; HeatShimmer = yebis.Config.HeatShimmer; LightShaft = yebis.Config.LightShaft; PreferredFormat = PixelFormat.R16G16B16A16_Float; // Make sure that the Depth Stencil will be created with ShaderResource Tags.Set(RenderTargetKeys.RequireDepthStencilShaderResource, true); }