void click() { var confirmButton = GameObject.Find("ComfirmCreationButton"); ressourceImage.GetComponent <Image>().sprite = gameObject.GetComponent <Image>().sprite; if (confirmButton) { ComfirmRessourceCreation butScr = confirmButton.GetComponent <ComfirmRessourceCreation>(); butScr.setImageId(id); } else { confirmButton = GameObject.Find("ComfirmModifyButton"); ConfirmModifyRessource butScr = confirmButton.GetComponent <ConfirmModifyRessource>(); butScr.setImageId(id); } }
public override void apply() { int id = int.Parse(args["id"]); string projectName = args["project_name"]; model = GameObject.Find("ModelRessource"); ModelRessource modelScr = model.GetComponent <ModelRessource>(); modelScr.find(id, projectName, applyInServerResponse); ConfirmModifyRessource butScr = confirmButton.GetComponent <ConfirmModifyRessource>(); butScr.setIdToModify(id); butScr.setProjectId(args["project_id"]); butScr.setProjectName(projectName); RemoveRessourceButton rmButScr = removeButton.GetComponent <RemoveRessourceButton>(); rmButScr.setProjectId(args["project_id"]); rmButScr.setProjectName(projectName); rmButScr.setIdToRemove(id); }