public void GetPropertyData(bool isSubGraph,
                             ChangeExposedFieldCallback exposedFieldCallback,
                             ChangeReferenceNameCallback referenceNameCallback,
                             Action precisionChangedCallback,
                             Action keywordChangedCallback,
                             ChangeValueCallback changeValueCallback,
                             PreChangeValueCallback preChangeValueCallback,
                             PostChangeValueCallback postChangeValueCallback)
 {
     this.isSubGraph = isSubGraph;
     this._exposedFieldChangedCallback  = exposedFieldCallback;
     this._referenceNameChangedCallback = referenceNameCallback;
     this._precisionChangedCallback     = precisionChangedCallback;
     this._changeValueCallback          = changeValueCallback;
     this._keywordChangedCallback       = keywordChangedCallback;
     this._preChangeValueCallback       = preChangeValueCallback;
     this._postChangeValueCallback      = postChangeValueCallback;
 }
Beispiel #2
0
        void IShaderPropertyDrawer.HandlePropertyField(PropertySheet propertySheet, PreChangeValueCallback preChangeValueCallback, PostChangeValueCallback postChangeValueCallback)
        {
            var diffusionProfileDrawer = new ShaderGraphDiffusionProfilePropertyDrawer();

            propertySheet.Add(diffusionProfileDrawer.CreateGUI(
                                  newValue =>
            {
                preChangeValueCallback("Changed Diffusion Profile");
                value = newValue;
                postChangeValueCallback(true);
            },
                                  value.asset,
                                  "Diffusion Profile",
                                  out var _));
        }