Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Creating a Tic-Tac-Toe Game Using Only UI Components - Foundation game play

Discussion in 'Prefabs' started by vaishalivyas4, Jan 23, 2020.

  1. vaishalivyas4

    vaishalivyas4

    Joined:
    Sep 17, 2019
    Posts:
    3
    HELP!!!

    So I Followed The Following Instructions From Here: https://learn.unity.com/tutorial/cr...g-only-ui-components#5c7f8528edbc2a002053b4be


    With the Grid Space prefab selected,

    ... drag the Grid Space prefab onto the Button property.
    ... drag the child Text GameObject from the Grid Space prefab onto the Button Text property.

    ... set the Player Side property to "X" (or any other string value you choose to test with)

    But I Got An Issue Here...

    "Getting stuck at this point. Using 2019.2, might be the issue. [there is no grid space script in the inspector. Had to add component to get it. When I dragged grid space from the Hierarchy to the project window into the prefab folder no text child came along. Therefore there is no text file to drag into the button text of the script in the inspector. When I test the game I just get white blocks when I click the buttons. This matches up with the Button (script) which has a selected color field that your tutorial doesn't show. After playing around I found out that in the Button Text field just click on the little circle to the right, a pop-up window appears and there is the text file I needed. Now my issue is that my original grid space gameobject is acting differently than the duplicated grid space gameobjects. Somehow the prefap isn't attached to it I'd guess. ]"

    Now The Above One Is Solved... But When I Run It And Click Any Button, The Very First Button Automatically Shows "X" Without Even Being Clicked... And Other Buttons Don't Show "X" Even After They're Clicked...

    ttt.png

    Can Someone Help Me With This, Please?