-
Hi there Mixture is amazing, thanks so much! I haven't been able to figure out how to modify exposed parameters at runtime. Could you help me out with this? I thought that I can reference the Graph as a MixtureGraph object (and then use mixtureGraph.SetParameterValue(...)), but Unity won't let me drag it into the GameObject. I can reference it as a CustomRenderTexture, but don't know how to access the exposed params from there. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello 🙂 Yeah, it's a limitation on Unity side, even though the MixtureGraph asset exists as subasset of the generated texture asset, you can't assign it like this. It would be possible to do it this way if the mixture graph subasset was visible but right now it's hidden and I'm not sure if it's worth exposing the graph in the UI like that. The simplest solution is to call the Note that the parameters are directly serialized in the graph so when you change a parameter value by script, the asset is changed in memory and will be written to the disk next time you save/exit the project. |
Beta Was this translation helpful? Give feedback.
Hello 🙂
Yeah, it's a limitation on Unity side, even though the MixtureGraph asset exists as subasset of the generated texture asset, you can't assign it like this. It would be possible to do it this way if the mixture graph subasset was visible but right now it's hidden and I'm not sure if it's worth exposing the graph in the UI like that.
The simplest solution is to call the
MixtureDatabase.GetGraphFromTexture
function that will return the graph from the texture you exposed in your script, you can see an example of this here: https://github.com/alelievr/Mixture/blob/master/Assets/Examples/StandaloneMixture/ProcessMixture.cs#L20Note that the parameters are directly serialized in the grap…