Ejemplo n.º 1
0
    public void SpawnShape(int ID)
    {
        var shape     = Shapes.Find((s) => s.ID == ID);
        var shapeData = ModelDataSerializer.DeSerializeDataModelfromDisc(Application.persistentDataPath, shape.Name + "Data.xml");

        if (CurrentShape != null)
        {
            Destroy(CurrentShape.gameObject);
        }

        CurrentShape = Instantiate(shape);
        if (shapeData != null)
        {
            CurrentShape.SetShapeData(shapeData);
        }
    }
Ejemplo n.º 2
0
 private void OnEnable()
 {
     shape = (Shape_3D)target;
 }