|
Is there a way to set the border properties of a GuiTexture object from script? I've gone over the available properties several times but I can't seem to find the corresponding properties. Did I miss it or is it just not supported for some reason? (I'm not referring to the pixel inset btw which I can see, but the "Left Border", "Right Border", ... etc)
(comments are locked)
|
|
I actually had an idea on how to do this after all which I didn't get around to testing yet so someone else might want to try it: Checkout SerializedObject and SerializedProperty. You might be able to write a wrapper or utility method that bypasses this limitation and allows you to set the properties from code. Thanks for the tip amirabiri, but I'd need to do this dynamically at runtime (I'd need just to read those borders, so I can set min size of GUITexture when I scale it), not in an editor script.
Nov 09 '11 at 02:36 PM
Izitmee
Yes I forgot that part... my needs were the same. You could try and "explore" the GuiTexture class with those classes or normal C# reflection and then try to do the same bypass with C# reflection or serialization.
Nov 09 '11 at 03:09 PM
amirabiri
(comments are locked)
|

OK further digging through old forum archives reveals that this is a pending issue. It is currently not possible to do this with scripting.
Damn, I really needed to be able to do this :/