stereolabs / zed-unity

ZED SDK Unity plugin
https://www.stereolabs.com/documentation/guides/using-zed-with-unity/introduction.html
MIT License
254 stars 57 forks source link

Green Screen Manager : How to dynamically change the " Range " value ? #231

Closed Gnoknop closed 2 years ago

Gnoknop commented 2 years ago

Preliminary Checks

Proposal

Hello, I am wondering how could I dynamically ( in script ) change the " Range " value ?

Gived it a few try but, while it does change the " Range " float value and the Range slider, in the inspector, it doesn't affect the final result. The final result only update when you manually use the slider in the inspector.

Is there a way to do it in script ?

S.D.K Version i use : 3.6.0

Thank you for your help

Use-Case

No response

Anything else?

No response

Bvallon-sl commented 2 years ago

Hi,

You need to call the GreenScreenManager.UpdateShader() function just after modifying the range value (or any other param).

Best, Benjamin Vallon

Gnoknop commented 2 years ago

How could i miss it ? Works perfectly, thanks a bunch !

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days