• 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by sir-malc · Jun 25, 2013 at 01:52 AM · objectscaling

How texture objects are scaled

I'm an experienced programmer, but new to unity. I'm trying to understand how an object created from a texture is scaled from very small (almost zero size) to much larger than the texture pixel dimensions.

What I expected to see was the default scale components for the texture object set to 1.0. Then to scale the texture larger, increase the scale values above 1.0 (e.g.2.0 = double size) and to scale the texture smaller, decrease the values towards 0.0 (the limit where the texture would disappear).

What I see is that the default scale components are 0.0. I can scale the object larger by increasing this number (1.0 seems to double the size), but I have found no way to scale it smaller. I've tried negative scale values, but these produce strange scalings that do not preserve shape.

I think I'm missing something here. Can anyone explain how I should be doing this. .

Comment
Add comment · Show 5
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 Jessy · Jun 25, 2013 at 03:31 AM 0
Share

"default scale components" doesn't mean anything to me, and neither does "object created from a texture"; can you please try to explain using Unity ter$$anonymous$$ology?

avatar image amphoterik · Jun 25, 2013 at 01:11 PM 0
Share

What are the dimensions of the texture?

avatar image sir-malc · Jun 25, 2013 at 05:07 PM 0
Share

Texture is 256x256. But I think I know my problem. I'm effectively trying to create a 2d sprite. I used "gameObject>CreateOther>GUI Texture" for this, which I think is the wrong approach. I'm going to try creating a plane object and attach the texture to it. I think it will scale properly then. Also saw a 2dGUI asset set in the asset store that I might get.

avatar image amphoterik · Jun 25, 2013 at 05:09 PM 0
Share

@sir-malc1 you got it.

avatar image Bunny83 · Oct 03, 2013 at 09:19 AM 0
Share

Can we close this one? Or do you still expect an actual answer from someone? If you figured out your problem you can post an answer yourself describing what you did to solve your issue. Don't forget to mark the answer as solution.

If you don't want to post an answer, at least tell us if this can be closed (or even better deleted).

Open questions like this one without an answer will just frustrate others that come across your question, hoping to find an answer

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by robertbu · Oct 03, 2013 at 03:08 PM

GUITextures are a special case. The standard way of scaling them is to modify the Width and Height in the Pixel Inset values to whatever size in pixels you want it displayed.

As for planes in 3D space, the size will be in world units, and based on the default size of the object you have the texture attached to. A Plane game object is 10 x 10 world units (and starts out horizontal). The new Quad game object is a vertical plane 1 x 1 world units in size. There is also the CreatePlane editor script that allows the creation of planes in specified sizes, orientations, and anchors. You can scale planes proportionally like you suggest, though you have to get the axes right: XZ for Planes and XY for Quads.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

18 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

Related Questions

Complex object scaling 0 Answers

Object scale changing 0 Answers

increase size of object when button pressed 0 Answers

Scale object by perlinnoise randomized. 1 Answer

Instantiate and Scaling 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