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 /
This question was closed May 30, 2013 at 04:32 AM by robertbu for the following reason:

Question has multiple technical issues and is too broad

avatar image
0
Question by mrichey · May 30, 2013 at 01:55 AM · spawnitemsingame

How would you make an in-game editor/object spawner?

How would I make an in-game level editor. Just to quickly drag and drop objects into the scene from a menu, it's a mobile game, so two hands to rotate, etc. It is a similar system to creating your own skate park in Skate 3, if you've ever played it. So I just want to know where to start in doing all of this. Sorry if this sounded a bit complicated, but I'm fairly new to Unity. Thanks in advance.

Comment
Add comment · Show 1
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 robertbu · May 30, 2013 at 04:31 AM 0
Share

This question involves multiple technical questions and is really a discussion question that belongs in the forum. The are many posts on this list that address the many parts of your question.

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by Tarlius · May 30, 2013 at 04:22 AM

I think you're asking a lot more than you realise in this question. For the title question (ie: object spawner), you'll want to look at Object.Instantiate() and prefabs.

 public GameObject prefab;
 public Create() {
     GameObject instance = (GameObject) Instantiate(prefab, Vector3.zero, Quaternion.identity);
     // etc
 }

For the UI, you could get a simple prototype going with the GUI class, but since its for mobile you'll probably want to use something from the Asset Store. I don't know what the cool kids are using these days, but we're using EZGUI moving towards NGUI here.

I seem to recall there being gesture support ("two hands to rotate") built into Unity, but a quick google turned up a blank. You'll probably be better off starting very simple though. Press one button to "create" the object, then have up down left right buttons to move.

Dragging will be a little more involved, but if you code the basics with the intention of expanding later, it should be doable. For example, instead of "moveUp", "moveDown"/etc, use "MoveTo(x, y)" and have another class managing the buttons and working out where to MoveTo. You can then replace/supplement later with a class that implements the drag logic.

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

Follow this Question

Answers Answers and Comments

14 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

Related Questions

Mulitplayer problem [Simple Fix] Probably 1 Answer

In-Game Editor in Unity possible? 3 Answers

Pick animation ingame 1 Answer

Spawning objects at points within another object? 1 Answer

Is there anything wrong with this script? It used to work but now it doesn't. 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