Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Tic-Tac-Toe Tutorial (aka Noughts and Crosses) Q&A

Discussion in 'Community Learning & Teaching' started by Adam-Buckner, Apr 22, 2016.

  1. Paulusp

    Paulusp

    Joined:
    Sep 27, 2019
    Posts:
    3
    Hi, I've just completed this course in 2019.2.8f1 and it's all good. I found it an excellent course and learned a lot about the Unity UI so thanks very much. I now want to extend the game to include the list below and happy to share the final result if anyone's interested.
    // Sound on keypress - just the grid to complete now but I want to play a different sound depending on X or O turn, tips appreciated.
    // I would also like to change the gid text colour depending on the player to make potential winning lines more obvious
    // Add 1 or 2 player, 2 player is obviously done but for 1 player I want to add AI for the computer that still has a random edge to it so the AI doesn't always win. Already have some ideas on this so watch this space!
     
    Last edited: Oct 5, 2019
    nitrofurano likes this.
  2. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
    i wasn't that “lucky”... please share Assets and ProjectSettings folders of it! ;)
     
  3. Paulusp

    Paulusp

    Joined:
    Sep 27, 2019
    Posts:
    3
    Hi Nitro, my effort after the project is here:
    https://bit.ly/31XmaaN
    Still working on the AI :)
    Assets & Project Settings attached. Hope that helps.
     

    Attached Files:

    nitrofurano likes this.
  4. nitrofurano

    nitrofurano

    Joined:
    Jun 7, 2019
    Posts:
    92
    excellent! thanks a lot, Paulusp!
     
  5. Paulusp

    Paulusp

    Joined:
    Sep 27, 2019
    Posts:
    3
    And complete package now with loading screen and AI if you're interested:

    Here is a link to the completed game: https://bit.ly/33vajRY
     

    Attached Files:

    Last edited: Oct 14, 2019
    nitrofurano likes this.
  6. NewbieOneKanobie

    NewbieOneKanobie

    Joined:
    Dec 17, 2019
    Posts:
    3
    In Tutorial Section 3, when I created the Grid Space Prefab, the Text child folder did not get created in the Project window.

    So I added the Text child folder in my Project window, and tried dragging the Text from the Hierarchy window to Prefab folder in the Project window. I got the message: "Cannot restructure Prefab instance Children of a Prefab instance cannot be deleted or moved, and components cannot be reordered. You can open the Prefab in Prefab Mode to restructure the Prefab Asset itself, or unpack the Prefab instance to remove the Prefab connection."

    In my Hierarchy window, when Grid Space is selected, the Inspector has a label Prefab, with 3 buttons to the right: Open, Select, and Overrides. I

    n my Hierarchy window, when Text is selected, the Inspector does not have a Prefab label and none of with 3 buttons to the right. Somehow, (can't duplicate how!) I also got this message: "Cannot restructure Prefab instance The Prefab asset is missing. You have to unpack the Prefab instance to be able to create a new Prefab."

    I'm using Unity 2018.4.14, which I believe I read is the correct installation to use.

    I have also downloaded the 2019.2.17f1.

    Please help.
    Thank you.
     
  7. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    336
    See this thread:
    Copying button and child text from Hierachy to projects window.
     
    NewbieOneKanobie likes this.
  8. NewbieOneKanobie

    NewbieOneKanobie

    Joined:
    Dec 17, 2019
    Posts:
    3
unityunity