x


Exception: not implemented?

I don't understand what's going on here. I got the error "Exception: not Implemented, UnityEngine.Texture.set_width(Int32 value)......"

Here's my code:-

selStrings = new Texture[StackNum];
       www = new WWW("file://" + Application.dataPath + "/Screenshots/ScreenShot" + Minus + ".png");
       selStrings[Minus] = new Texture2D(0.1, 0.1, TextureFormat.RGB24, false);
       Debug.Log(StackNum);
       www.LoadImageIntoTexture(selStrings[Minus]);
       selStrings[Minus].width = 800;

Everything was alright up until I tried to set the width of the texture. Am I doing something wrong here, or is it just a bug in Unity?

more ▼

asked Jul 14 '11 at 05:00 AM

Sixakoo_ gravatar image

Sixakoo_
100 7 9 10

Maybe because the .width function is read only? Is so, how do I change the size of the texture?

Jul 14 '11 at 05:13 AM Sixakoo_

@Sixakoo: you don't need to wonder if it's read-only, you can just look it up in the docs.

Jul 14 '11 at 06:01 AM Eric5h5
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Texture2D.Resize only resizes the texture, it doesn't scale the contents. You can use this instead.

more ▼

answered Jul 14 '11 at 05:54 AM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

Thanks a bunch, just what I need!

Jul 14 '11 at 08:00 AM Sixakoo_
(comments are locked)
10|3000 characters needed characters left
more ▼

answered Jul 14 '11 at 05:42 AM

DaveA gravatar image

DaveA
26.4k 151 171 256

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2188
x1355
x524
x128
x1

asked: Jul 14 '11 at 05:00 AM

Seen: 1578 times

Last Updated: Jul 14 '11 at 08:00 AM