keijiro/Lasp

Question: How to get Property binding to work with properties in components other than transform?

Closed this issue · 2 comments

Hi,

First thing I'm loving this library and playing around with it to make audio visualizations and appreciate the work you put into it. I have a question about the use of property binders. It seems the only thing I can get working is the vector3 property binder with transforms. I tried attaching a component script I made with a public vector3 property to the sphere and when I select that component within the vector3 property binder it says no "vector3 property found". The same thing seems to happen if I try a color or float property binder. I was wondering if this was a work in progress or if there was something I'm not understanding with how these property binders work.

One way I did to get around this was to have a helper function in my script to calculate a color based on the x,y, and z-axis of the local scale of the transform so that way as the AudioLevelTracker affects the spheres scale it can also influence its color. If there is any other easier way to achieve this effect out of the box feel free to let me know otherwise using the local scale or some other property of transform as a seed to manipulate objects in my scene seems to suffice for my needs.

Please make sure that you implemented a public C# property getter/setter. Note that it doesn't support simple public variables -- It needs property implementation.

Thanks just tried it out today and that solved it. Thank you for and wonderful work you've done on this library.