ObjectManager.Register C# (CSharp) Method

Register() public static method

public static Register ( GameObject obj, string id ) : void
obj GameObject
id string
return void
    public static void Register(GameObject obj, string id)
    {
        //Debug.Log ("Trying to register " + id);
        objects.Add(id, obj);
    }

Same methods

ObjectManager::Register ( GameObject obj ) : void

Usage Example

Esempio n. 1
0
    public String spawnOverNetwork(String prefabName, Vector3 pos)
    {
        GameObject.Find("CrateGUI").GetComponent <CrateGUI>().IncrementCrateCount();

        GameObject temp = (GameObject)Network.Instantiate(Resources.Load(prefabName) as GameObject, pos, Quaternion.identity, 0);

        ObjectManager.Register(temp, "" + temp.GetHashCode());
        return("" + temp.GetHashCode());
    }
All Usage Examples Of ObjectManager::Register