Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 vmvenkat · Dec 16, 2014 at 06:22 AM · gameobjectimagesize

How to create 3D game object in specified pixel size?

I want to create an game object in some specified size. For example to create an 3d cube in 250x350 pixel size. I am new for unity. If anyone know help me, thank.

Comment
Add comment · Show 4
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 taxvi · Dec 16, 2014 at 06:31 AM 0
Share

dude, use google for such trivial stuff

avatar image HarshadK · Dec 16, 2014 at 06:34 AM 0
Share

What is the unit of your size? Unity units? pixels? centimeters? inches? miles? yards? ....

avatar image vmvenkat · Dec 16, 2014 at 06:48 AM 0
Share

in inches

avatar image vmvenkat · Dec 16, 2014 at 06:50 AM 0
Share

or in pixels

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by HarshadK · Dec 16, 2014 at 07:16 AM

On unit in Unity is one meter. Convert meters to inches and create an object with that size. If scale of your Unity objects represents 1 meter to 1 scale unit then you can create object with scale value representing the 1 meter to 1 inch otherwise you have to take scale also into consideration.

Comment
Add comment · Show 4 · 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 vmvenkat · Dec 16, 2014 at 07:23 AM 0
Share

Thank for reply, i have another question 1 units = how many pixels.

avatar image HarshadK · Dec 16, 2014 at 07:24 AM 0
Share

That is not pre-defined in 3D view as Unity adjusts the camera viewport to match the screen resolution of the device.

avatar image vmvenkat · Dec 16, 2014 at 07:30 AM 0
Share

If want to make 350 x 250 pixel cube means then how can i scale it(in units).

avatar image HarshadK · Dec 16, 2014 at 09:16 AM 0
Share

From one point on the screen find the point in the world using Camera.ScreenToWorldPoint and perform the same step for another point which is say 350 pixels away. Now the difference between these two points in world space is the length for your cube with its side in 350 pixels. Similarly you can do it for 250. Now you have the world space values for these which you can use for creating your cube.

avatar image
1

Answer by Robert-Paulson · Dec 16, 2014 at 07:19 AM

You can use Scale parameter of transform. By default cube is 1x1x1 unity unite, Scale is multiplier

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 vmvenkat · Dec 16, 2014 at 07:31 AM 0
Share

Thank for reply but i can't understand. I want to create an 3d cube in 250x350 pixel size

avatar image Robert-Paulson · Dec 16, 2014 at 07:45 AM 0
Share

oh man, it's like asking how big should be the cube so on photo it will be 250x350 pixels. It's a matter of other things like resolution of the screen, how far the camera from the cube and etc.

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

28 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

Related Questions

A node in a childnode? 1 Answer

C# Preserving GameObjects' Previous Meshes 1 Answer

C# Gameobject Rigidbody Mouse Collision 1 Answer

Populate game objects from a list?? (C#) 1 Answer

C# Child GameObject Disabled Script SetActive(false) 1 Answer


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