Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Megii · Aug 22, 2017 at 01:50 AM · backgroundscrolling

Problem with Scrolling Background in more recent version of Unity..

I'm making a game in which I very need to put my background to scroll, in earlier versions of Unity it was done very easily, by putting the specific background in import settings being Texture, also set to 'Repeat' adn this worked! But in the newer versions of Unity there is no more 'Texture', some say Instead of 'Texture' is now 'Default', but I tried it and it still does not work..if i dont find out how to make a scrolling background in the current version(5.6) which i use, I will should to download the older version in which the same thing is much easier to make..

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by adipatil3517 · Aug 22, 2017 at 05:34 AM

plz attach your code for better understanding

Comment
Add comment · Show 2 · 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 Megii · Aug 22, 2017 at 12:08 PM 0
Share

There is no code here, here is a link that in earlier versions this could have been done: https://www.youtube.com/watch?v=HrDxn$$anonymous$$I7pCc But as there are now no more options like in the video, I must find a special way to do this, because I'm using the new version of Unity.

avatar image adipatil3517 Megii · Aug 22, 2017 at 12:54 PM 0
Share

it is the same as previous and keep it to default and repeat mode and apply texture on quad or plan and through coding change the offset. @$$anonymous$$egii

avatar image
0

Answer by naryk86 · Aug 23, 2017 at 07:34 PM

Could you explain better, please? I wrote this script, to move horizontally 2 sprites (because I think that in unity2017 I can use sprite without Quad). (tileSizeZ is the size of one of the sprites.)

public float scrollSpeed; float tileSizeZ;

 private Vector3 startPosition;

 // Use this for initialization
 void Start()
 {
     startPosition = transform.position;
     tileSizeZ = transform.GetComponent<Renderer>().bounds.size.x;

 }

 // Update is called once per frame
 void Update()
 {
       float newPosition = Mathf.Repeat(Time.time * scrollSpeed, tileSizeZ);
     transform.position = startPosition + Vector3.right * newPosition;

}

But I obtain that the 2 sprites return to the original position.

Thanks

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 Megii · Aug 23, 2017 at 10:27 PM 0
Share

I fix the problem, just follow this video exactly, only difference is to set you background to be default ins$$anonymous$$d of texture(in import settings).. https://www.youtube.com/watch?v=HrDxn$$anonymous$$I7pCc

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

69 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

parallax scrolling background 2 Answers

Vertical camera scrolling fix? 0 Answers

Large finite background for vertical scroller - best approach? 1 Answer

How do I make a 2D scrolling background with variable speed? 2 Answers

Resolution Independent Scrolling Background 0 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