Search Unity

No projects compile since updating to latest version of Unity

Discussion in 'Editor & General Support' started by Maclennan, Jul 28, 2019.

  1. Maclennan

    Maclennan

    Joined:
    Jul 28, 2019
    Posts:
    1
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class Hexagon : MonoBehaviour
    6. {
    7.      public Rigidbody2D rb;
    8.  
    9.     public float shrinkSpeed = 3f;
    10.     public GameObject MyTimer;
    11.  
    12.     // Start is called before the first frame update
    13.     void Start() {
    14.         rb.rotation = Random.Range(0f, 360f);
    15.         transform.localScale = Vector3.one * 10f;
    16.     }
    17.  
    18.     // Update is called once per frame
    19.     void Update() {
    20.         transform.localScale -= Vector3.one * shrinkSpeed * Time.deltaTime;
    21.  
    22.         if (transform.localScale.x <= .05f)
    23.         {
    24.          
    25.             Destroy(gameObject);
    26.         }
    27.     }
    28. }
    29.  
    The namespace UnityEngine isn't being recognised for some reason :/
     
  2. ShaneP1

    ShaneP1

    Joined:
    Aug 23, 2018
    Posts:
    5
    Facing same issue here too. Help is appreciated.

    Thanks in advance.
    Regards,
    Shane
     
    Last edited: Aug 1, 2019