Hi, I have declared a Texture2d like this: Code (csharp): public Texture2D leftBoxBG; In my Start() function i try to set the dimensions of it: Code (csharp): leftBoxBG.width = 150; leftBoxBG.height = 300; But I get an error saying: Exception: not implemented UnityEngine.Texture.set_width (Int32 value) (at C:/BuildAgent/work/842f9557127e852/Runtime/ExportGenerated/Editor/Graphics.cs:420) GuiBuilder.Start () (at Assets/Standard Assets/Scripts/Game/GuiBuilder.cs:49) I'm not sure how to understand, much less fix this. I mean, the intelliSense picks up a .width and .height, so I don't get how they could not be implemented? Any amount of light-shedding is appreciated!
Height and Width are read-only variables. If you want to change your texture, try something like this: leftBoxBG = new Texture2D (100,100); // where 100 and 100 are your desired width and height EDIT: Also, you may want to check this. And the whole Texture2D class in general
oh. I see. Thank you! Weird exception to throw, though. But I guess it's referring to the operation rather than the member.
I believe it was reffering to UnityEngine.Texture.set_width not being implemented, which makes sense as there is no such method/function You're welcome