Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,