Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Can you put a code into a spoiler?

Discussion in 'Meta-forum Discussion' started by LetsStartSomeSeriousCoding, Sep 17, 2018.

  1. LetsStartSomeSeriousCoding

    LetsStartSomeSeriousCoding

    Joined:
    Apr 2, 2017
    Posts:
    33
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class Player : MonoBehaviour {
    6.  
    7.     public float speed;
    8.     public GameObject target;
    9.  
    10.     void Update () {
    11.         transform.position = Vector3.MoveTowards(transform.position, Pathfinding.getDirection(transform, target.transform.position), Time.deltaTime*speed);
    12.     }
    13. }
    14.  
    Oh yeah
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,277
    Fail opportunity, writing Oh yeah in the spoiler title