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

I have a UI bug I can't seem to fix or find please help I am new to this.

Discussion in 'UGUI & TextMesh Pro' started by Shobosa, Aug 10, 2015.

  1. Shobosa

    Shobosa

    Joined:
    Jul 8, 2015
    Posts:
    18
    I am doing a canvas with score overlay and I am getting a error causing me to not compile correctly.
    The console error I am getting is :

    /Scripts/TargetDamage.cs(49,35): error CS1061: Type `Level' does not contain a definition for `Currentscore' and no extension method `Currentscore' of type `Level' could be found (are you missing a using directive or an assembly reference?)

    void Kill () {
    // As the particle system is attached to this GameObject, when Killed, switch off all of the visible behaviours...
    spriteRenderer.enabled = false;
    control.CurrLevel.Currentscore += 8000;
    GetComponent<Collider2D>().enabled = false;
    GetComponent<Rigidbody2D>().isKinematic = true;
    Destroy(this.gameObject,.5f);
    // ... and Play the particle system
    GetComponent<ParticleSystem>().Play();
    }

    thanks,
     
unityunity