Horje
unity destroy self Code Example
unity destroy self
Destroy(gameObject);
destroy gameobject unity
Destroy(this.gameObject);
unity destroy self

void Update() {
    float y = Random.Range(-4.53f, 2.207f);
    if(x < 2000) {
        GameObject clone = (GameObject)Instantiate(obstacle, new Vector3(y, x * 6.0f, 0),Quaternion.identity);
        clone.AddComponent(typeof(DestroyMySelf));
        x++;
    }
}

Source: devarama.com




Csharp

Related
check ping c sharp Code Example check ping c sharp Code Example
how to destroy an object in unity Code Example how to destroy an object in unity Code Example
c# remove all null from list Code Example c# remove all null from list Code Example
regex for email c# Code Example regex for email c# Code Example
get text between two strings c# Code Example get text between two strings c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13