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 kriket · Feb 12, 2015 at 11:05 AM · unity 2d

Is there any way of creating primitive 2D shapes in unity?

I have read the whole unity manual and watched the videos on sprites but I have a question. Is there any way of creating primitive 2D shapes in unity? (I will be assigning trigger colliders to these as well). Or does one need to have a 3rd-party program even for basic primitive 2D shapes? My game really is very minimalist.

I did think about using particle system in a clever way but that won't have triggers and may not be as memory efficient for the several basic shapes that I am after.

Comment
Add comment · Show 2
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 hexagonius · Feb 12, 2015 at 11:43 AM 0
Share

For your visuals use quads (Sprites). If you want a circle, use a Texture with a circle on it. You can still use colliders with shapes different from your visuals. If you want colliders different from the primitives use the PolygonCollider2D

avatar image ToroidGames · Jan 29, 2020 at 11:29 AM 0
Share

Try the Sprite Creator - link text

1 Reply

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

Answer by Owen-Reynolds · Feb 12, 2015 at 04:29 PM

If you know the math, you can use the Mesh class to make anything you want, on the fly. Say you want a hexagon, where just one point stretches. Remaking your own mesh is about the only way to do that. Then, you can use the same mesh as a collider (for 3D, I assume for 2D.)

But you do have to learn how graphics cards store meshes, in order to use it (not that hard, but not easy.)

Can also use the Texture2D class to make set your own textures pixel-by-pixel. Again, if you know the math (how tall is an equilateral triangle of side length 1?)

But if they aren't going to change and esp. if you want tiny bits of "character" on them, it's probably easiest just to make textures in a free image program, like Gimp.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

how to move child object inside a moving parent in 2d using Vector2.MoveTowards()? 1 Answer

How can i create multiplayer game using wifi hotspot in unity 0 Answers

Game for 2 players using 2 android devices 0 Answers

GDPR unity and Admob ads 0 Answers

LoadSceneAsync makes unity behave differently after build. 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