Adam's Lair Forum

game development and casual madness
It is currently 2019/11/20, 21:07

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2016/03/06, 06:01 
Junior Member
Junior Member
User avatar

Joined: 2016/03/02, 04:35
Posts: 48
Role: Observer
Hello! Today I was trying to make a background fill the whole "scene" but I couldn't get it to work properly. I set the rect's size and choose the texture and stretch it: works as expected.

Image


But when I try to make it so the texture of the rect will be tiled, it doesn't work:

Image


The tex is there with its correct size, but how to make it fill the whole rectangle?

Thanks in advance! :)


Top
 Profile  
 
PostPosted: 2016/03/06, 10:50 
Forum Adept
Forum Adept

Joined: 2015/07/08, 16:41
Posts: 414
Role: Gamer
To make the background repeat, you'll have to modify the Texture resource that the SpriteRenderer is using, too. Change the WrapX and WrapY properties to what you need. If you're texture is not a power of two texture, you may have to fiddle around with the TextureSizeMode property as well.

Here's a previous topic where this was discussed: http://forum.adamslair.net/viewtopic.php?f=4&t=377


Top
 Profile  
 
PostPosted: 2016/03/06, 11:51 
Junior Member
Junior Member
User avatar

Joined: 2016/03/02, 04:35
Posts: 48
Role: Observer
Oh, I see. Thanks! c:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group