Horje
destroy gameobject unity Code Example
how to destroy an object in unity
Destroy(gameObject);
how to destroy a gameobject in c#
Destroy(gameObject); // destroys the game object attached to the script
destroy gameobject unity
Destroy(this.gameObject);
destroy gameobject unity

void OnTriggerEnter()
{
    if(PlayerPrefs.GetInt("GotPotion", 0) == 0)
    {
        // You didn't get the potion yet, so get it
        Destroy(gameObject);
        PlayerPrefs.SetInt("GotPotion", 1); // got the potion
    }
}





Csharp

Related
c# play wav file Code Example c# play wav file Code Example
when was the third world war Code Example when was the third world war Code Example
how to save a c# dictionary Code Example how to save a c# dictionary Code Example
c# remove char from string Code Example c# remove char from string Code Example
select a object from list based on a value csharp Code Example select a object from list based on a value csharp Code Example

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