this.dynamicPanel=Instantiate(_panel_template,_panel_template.transform.position,Quaternion.identity,globalGUI.transform);// 4'th arg allow set object as child
this.dynamicPanel.transform.localPosition=_panel_template.transform.position;// prevent overwritten position by... environment???
this.SetupPanel();// bind pandel to current chest
isOpen=true;
}else{
Debug.Log("Can't find global GUI object!!!");
}
}
/// <summary>
// Function which close Task Panel if its open
/// </summary>
publicvirtualvoidClosePanel()
{
Destroy(dynamicPanel);
isOpen=false;
}
/// <summary>
// Function which allow to add new task to manager list of tasks