Unity 5 - texture type

Hi,

When using Unity 5, it doesn’t let you set the sprite as a texture, going through the documentation, it looks like by setting it as default it should work, but after a lot of tweaking I can’t make it work.

Any tips?

Thanks!

Hi @Hugo_Sieiro,

If you select your image under Assets, then, in the Inspector you will note the Texture Type drop down menu at the top;

Simply select Texture.

Hope this helps.

1 Like

Thanks Rob, but I don’t see those drop down options. This is what I’m getitng

Sorry @Hugo_Sieiro, my screenshot was taken from Unity 5.4.1f1.

In Unity 5.5 Default appears to have replaced the Texture option, they are acting as filters I believe for the options underneath.

So, what is the specific issue you have when you select Default, what happens with your texture?

No worries,

The image behaves like a normal image, it doesn’t tile or repeat. So if I set the image size to match the canvas, the image stretches rather than tile or repeat like a texture should - based on the steps of the video.

I’ve been googling and reading documentation but I can’t seem to find an answer :frowning:

Thanks a lot for your help btw!

Daft question perhaps, but you have set the Wrap Mode to Repeat yes?

No daft questions here :slight_smile:
But yes, I do have set it up as repeat

Can you pop two screenshots up, the LevelCanvas and also it’s Grass child game object, details in the Inspector etc.

Sure thing, canvas, raw image and the actual asset inspector. Also screenshots showing the image as it is on screen and what happens when I increase the width and height

Thanks a lot!

Grass Time Import Settings

  • set the Non Power of 2 to Nearest

Raw Image

  • Rect Transform

    • Width 1600
    • Height 900
  • Raw Image (Script)

    • W 6
    • H 3.375
    • Y -0.15

Updated Sat Mar 18 2017 12:09

Let me know if the above works, I’ve upgraded a previous version to 5.5 and am effectively unpicking changes to get to what you have so that I can then reverse the order to let you know what you need to change, but as you are not at the end of the section yet I don’t want to cause any problems for your progress either.

1 Like

That worked perfectly! thank you so much @Rob

Do you know what the issue actually was by any chance? Just curious to see how to avoid similar issues in the future.

Thanks again

1 Like

Great to hear it’s working for you now - it was your Raw Image.

It could be that perhaps you did set it to the correct size initially, but then through trying other options it reverted to the 600x600 size you had in your screen shots? Or, that maybe it just wasn’t set at earlier, I note you hadn’t renamed the RawImage game object to Grass etc.


See also;

Section 7, Lecture 136 : Scaling Level Backgrounds

@01:55 : Grass Texture
@02:16 : Setting the Rect Transform
@02:32 : Renaming RawImage to Grass
@04:57 : 5 Rows and 9 Columns at 4:3 (scaling with UV Rect)

Hey @Rob I followed your instructions but I have still problem.

When I want duplicate texture and make “matrix” so I see just this.(pic bellow)
Do you know Help me please ? I dont know what can be wrong. I setup everything like you wrote higher.

Thank you kindly.
textureIssue

Hello Adrian,

Can you provide a screenshot of your import settings for the image please.

Snímka

Try with a Wrap Mode of Repeat instead of Clamp.

1 Like

Thank so much !

1 Like

No worries :slight_smile:

1 Like

It was doing fine until i updated Unity to 2018.1.9.f2 and the texture broke. Went through the lesson again and the remarks on this post but to no avail. Can anyone help?


image

[SOLVED]
Anyway after some digging and testing, i found the solution. Delete and reimport the texture and it worked.

2 Likes

Privacy & Terms