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 pippo19 · Nov 17, 2013 at 08:07 PM · objectgamecreateinside

Create object inside a game

hello to all you have never played Age of Empires? I wanted to create something that you can build objects from inside the game. (example, on aoe you can create stables, castles, houses) how do I do that if clikko on a box then place the mouse makes me the object I want to create?

sorry if I was unclear

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 pippo19 · Nov 17, 2013 at 07:13 PM 0
Share

how i can do that if i click on a box then place the object on a mouse position?*

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by salex100m · Nov 17, 2013 at 08:26 PM

Your question is very broad and is like asking "how do i make a game". There are a ton of tutorials out there that will help you get started. I like quill18creates's series, but I've watched hours of other tutorials as well. I suggest you start there.

http://www.youtube.com/watch?v=0Tl1Cc0IRnI&feature=c4-overview-vl&list=PLCD6B6D279036462A

But to answer your question more specifically (and in pieces):

1) Click on the screen: http://docs.unity3d.com/Documentation/ScriptReference/Input.GetMouseButtonDown.html

2) Get the point on the screen the mouse is clicking: http://docs.unity3d.com/Documentation/ScriptReference/Input-mousePosition.html

3) "Create something" http://docs.unity3d.com/Documentation/Manual/InstantiatingPrefabs.html http://docs.unity3d.com/Documentation/ScriptReference/Object.Instantiate.html

4) "Create a house or something" well you need a model of a house to start with... so

4a) http://forum.unity3d.com/threads/54064-How-to-Make-a-3D-Model 4b) Import that model into unity 4c) Make a prefab Gameobject of that model (google search "unity3d prefab")

So putting it all together, once you have the prefab'd "house", you can click on the mouse and instantiate the house

Like I said, you should just watch and copy those video tutorials until you can replicate their projects. You'll learn all these steps there.

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

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

script dosnt creat object where i want it to 1 Answer

Objects are visible through terrain 3 Answers

How can I make a Transform that I dont have to set each time I place a prefab? 1 Answer

Problem with destroying a gameObject when used with targeting 1 Answer

"E" to grab an object... 3 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