Unregister() public static method

public static Unregister ( string id ) : void
id string
return void
Example #1
0
    void convert(GameObject first, GameObject second)
    {
        string firstID = ObjectManager.GetID(first);

        ObjectManager.Unregister(firstID);
        GameObject crate = (Instantiate(second, first.transform.position, first.transform.rotation) as GameObject);

        ObjectManager.Register(crate, firstID);

        crate.transform.position =
            new Vector3(crate.transform.position.x, Terrain.activeTerrain.SampleHeight(crate.transform.position), crate.transform.position.z);

        Destroy(first);
    }
Example #2
0
    override public void handleMouseDown()
    {
        int to_remove = int.Parse(gameObject.GetComponent <Enchantable>().getId().Split(' ')[1]);

        if (gameObject.GetComponent <Enchantable>().isEnchanted())
        {
            return;
        }


        num_list.Remove(to_remove);



        ObjectManager.Unregister("Area " + to_remove);
        Destroy(gameObject);
    }