• 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 Chaosgod_Esper · Aug 16, 2013 at 01:25 PM · instantiatemousescenevieweditor extention

Editor Extention - How to instantiate?

Hi there

I´m still working on my 2D Tile Editor, and wanted to ask a very important thing..

I managed to create a "chose a tile" system as a Window in the Unity Editor. Now i want to instantiate a plane in the scene view, and use the TileX/Y position on the tileset, to use as texture for the plane.

i know how to use the materials..

My problem is: how can i instantiate a Plane with mouseclick/mousehold, and give it this texture? Do i need to send the tilesetposition and tilesetname to the scene view? if yes.. how?

Ps.: tileset = the 4096² Texture where all 16² tiles are stored intiles are stored in. Each map can have a individual one.

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 Benproductions1 · Aug 25, 2013 at 01:29 AM 0
Share

If I answered your question, please accept my answer. If you don't know how, watch the tutorial video on the right

avatar image Benproductions1 · Aug 25, 2013 at 05:44 AM 0
Share

Thank you :)

1 Reply

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

Answer by Benproductions1 · Aug 19, 2013 at 02:41 AM

Hello,

This is the beauty of the Unity Editor. Technically the Editor is just a feature-full overlay to the same engine. Every function that works at runtime works during the editor, because it is the same runtime.

Wether you call Instantiate from a MonoBehaviour, a AssetPostProcessor or an Editor, it does not matter. Every call will do the same exact thing. The same goes for any other runtime function. Anything you can do at runtime you can do in the editor :)

Hope this helps,
Benproductions1

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 Sajidfarooq · Aug 25, 2013 at 06:18 AM 0
Share

Teach a man to fish...I would have gone for the "give-em-the-code" approach. Good all-round answer. Up-voted.

avatar image Benproductions1 · Aug 25, 2013 at 06:43 AM 0
Share

Thanks ;)

I always try and avoid the "give-em-the-code" approach

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

17 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

Related Questions

Mouse position not returning actual position 0 Answers

Fire object towards mouse cursor 1 Answer

getting .Transform from instanntiated object 2 Answers

Scene view mouse jumping 3 Answers

Instantiate a prefab at the Mouse's position? 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