Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MadJohny · Dec 19, 2013 at 01:54 PM · spriteunity 2dtileoffsettiling

Sprite tiling and offset?

Hi, I started making a 2d game today, one thing that I couln't find is that in the sprite renderer component I don't see any tiling/offset variables, is it impossible to change because I need to do it and can't find a solution :/.

Sorry but when you answered I already had make it in a different way (Using 3d objects)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by supernat · Dec 20, 2013 at 07:07 AM

Use renderer.sharedMaterial.SetTextureOffset(), or use renderer.material.SetTextureOffset() to change it for only one instance of the object. However, that could have serious implications to frame rate if you change a lot of them.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Athineku · Dec 20, 2013 at 02:09 PM

You can find an example (where the sprite is even animated) in unify wiki: http://wiki.unity3d.com/index.php/Animating_Tiled_texture_-_Extended . Note that I would recommend using Material.mainTextureOffset ( http://docs.unity3d.com/Documentation/ScriptReference/Material-mainTextureOffset.html ) instead of Material.SetTextureOffset and Material.mainTextureScale ( http://docs.unity3d.com/Documentation/ScriptReference/Material-mainTextureScale.html ) instead of Material.SetTextureScale.

Note: I never worked with this yet, this is only from what I remember from my Unity studies...

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image theLucre · Jul 02, 2014 at 05:12 AM 0
Share

i'm using mainTextureOffset and the top and left of the texture image just stretch, it does not wrap around the plane. is there anyway to actually tile a texture onto a plane and animate the offset?

avatar image
0

Answer by Simonius Skjorn · Aug 12, 2014 at 10:12 PM

Hi, I've made an asset that will solve exactly this problem: https://www.assetstore.unity3d.com/en/#!/content/20333

You can use any material with this and it's fairly efficient.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I get my BoxCollider2D to stay centered on my sprite? 2 Answers

Remove a single tile from a tilemap 1 Answer

2d "fake" shadow is running away 0 Answers

Black lines between tile sprites 7 Answers

I need help with a Texture 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges