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

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:
    32
    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:
    3,777
    Fail opportunity, writing Oh yeah in the spoiler title