示例#1
0
    void click()
    {
        model = GameObject.Find("ModelCard");
        ModelCard modelScr = model.GetComponent <ModelCard>();
        string    name     = inputName.GetComponent <TMP_InputField>().text;
        string    desc     = inputDesc.GetComponent <TMP_InputField>().text;

        modelScr.addCollections(name, desc, projectId.ToString(), projectName, applyInServerResponse);
    }
示例#2
0
    void click()
    {
        model = GameObject.Find("ModelCard");
        ModelCard modelScr = model.GetComponent <ModelCard>();
        string    name     = inputName.GetComponent <TMP_InputField>().text;
        string    desc     = inputDesc.GetComponent <TMP_InputField>().text;

        if (name.Equals(""))
        {
            name = Guid.NewGuid().ToString();
        }
        if (desc.Equals(""))
        {
            desc = Guid.NewGuid().ToString();
        }
        if (idToModify == -1)
        {
            modelScr.addCollections(name, desc, projectId, projectName, sendList, parent.GetComponent <ModifyCardController>().getSelectedPhases());
        }
        else
        {
            modelScr.updateField(idToModify.ToString(), name, desc, projectId, projectName, sendList, parent.GetComponent <ModifyVisualCardController>().getSelectedPhases());
        }
    }