mlavik1 / UnityVolumeRendering

Volume rendering, implemented in Unity3D. Want to support the project? Donate a small sum to Save The Children(https://www.savethechildren.net/) or another charity, and send me a message, and I will be greatly motivated!
https://fosstodon.org/@unityvolrend
MIT License
458 stars 129 forks source link

Protection level for Texture2D variable defined in TransferFunction.cs #267

Closed kvijaykiran closed 1 month ago

kvijaykiran commented 1 month ago

Changed the protection level for Texture2D variable defined in TransferFunction.cs from private to protected. This change will allow for making 3rd party changes or customizations to transfer function creation as well as texture processing.

Without this change, I can only create a scriptable instance of TransferFunction in my own implementation, but Texture2Ds that I define and make changes to, do not get propagated to UnityVolumeRendering's workflow. I see a GetTexture() but did not find any SetTexture() that allows injecting my own texture.

Using a protected Texture2D variable will allow for inheriting the variable from TransferFunction class.

266

mlavik1 commented 1 month ago

Thank you for the PR! :)

kvijaykiran commented 1 month ago

You're welcome.