Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

How do I place a game object on a tile.

Discussion in 'Scripting' started by mdietz753, Nov 10, 2018.

  1. mdietz753

    mdietz753

    Joined:
    Aug 19, 2018
    Posts:
    3
    Hello, everybody,

    I try to place objects on single tiles with the mouse.
    I can display the coordinates of the respective tile with a mouse click (e.g. left click = -8, 13).
    I can click on the item in my inventory and it follows the mouse.
    But I just can't get any further, how can I get the object to be placed on exactly this tile (Sprite changes and a suitable game object is created)?

    If anyone could help me figure out how to connect the Gameobject with my value
    "Vector3Int coordinate" that would help me a lot! :)

    Many thanks in advance!