Ejemplo n.º 1
0
    public void PlaceObjectfromSO(SerializableObject so)
    {
        GameObject      go       = GameObject.Instantiate(gameData.availableObjects[SearchIdByNameIn(so.name, gameData.availableObjects)]);
        PlaceableObject building = go.GetComponent <PlaceableObject>();

        building.gameData = gameData;
        building.type     = so.type;
        building.InitializeWithSO(so);
    }